
如何解决MAMP无法正常启动运行的问题
convert_invalid_entities ( $content )
convert_invalid_entities: 这个函数从一个字符串中删除无效的HTML实体。无效的实体会在一些浏览器中引起显示问题,所以这个函数被用来确保只使用有效的实体。
将无效的Unicode引用范围转换为有效范围。
function convert_invalid_entities( $content ) { $wp_htmltranswinuni = array( '€' => '€', // The Euro sign. '' => '', '‚' => '‚', // These are Windows CP1252 specific characters. 'ƒ' => 'ƒ', // They would look weird on non-Windows browsers. '„' => '„', '…' => '…', '†' => '†', '‡' => '‡', 'ˆ' => 'ˆ', '‰' => '‰', 'Š' => 'Š', '‹' => '‹', 'Œ' => 'Œ', '' => '', 'Ž' => 'Ž', '' => '', '' => '', '‘' => '‘', '’' => '’', '“' => '“', '”' => '”', '•' => '•', '–' => '–', '—' => '—', '˜' => '˜', '™' => '™', 'š' => 'š', '›' => '›', 'œ' => 'œ', '' => '', 'ž' => 'ž', 'Ÿ' => 'Ÿ', ); if ( strpos( $content, '' ) !== false ) { $content = strtr( $content, $wp_htmltranswinuni ); } return $content; }