convert_invalid_entities( string $content )
Converts invalid Unicode references range to valid range.
描述
参数
- $content
-
(string)
(Required)
String with entities that need converting.
返回值
(string) Converted string.
源代码
File: wp-includes/formatting.php
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;
}
更新日志
Version | 描述 |
---|---|
4.3.0 | Introduced. |
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数esc_html_x()用法示例
- wordpress函数esc_html()用法示例
- wordpress函数esc_html_e()用法示例
- wordpress函数esc_attr_x()用法示例
- wordpress函数esc_attr__()用法示例
- wordpress函数esc_attr_e()用法示例
- wordpress函数esc_attr()用法示例
- wordpress函数enqueue_embed_scripts()用法示例
- wordpress函数ent2ncr()用法示例
- wordpress函数enqueue_comment_hotkeys_js()用法示例
- wordpress函数edit_user()用法示例
- wordpress函数email_exists()用法示例
- wordpress函数endElement()用法示例
- wordpress函数edit_term_link()用法示例
如有疑问,请前往问答中心反馈!
反馈