wpseek.com
A WordPress-centric search engine for devs and theme authors
convert_invalid_entities › WordPress Function
Since4.3.0
Deprecatedn/a
› convert_invalid_entities ( $content )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: |
Converts invalid Unicode references range to valid range.
Related Functions: convert_smilies, _sort_nav_menu_items, wp_kses_named_entities, wp_convert_hr_to_bytes, wp_kses_normalize_entities
Source
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 ( str_contains( $content, '' ) ) { $content = strtr( $content, $wp_htmltranswinuni ); } return $content; }