某些情况下WordPress代码自动转义多此一举,需要关闭,以免程序代码中特殊符号被转义。
/wp-includes/formatting.php,function wptexturize()中:
lseif ( empty($no_texturize_shortcodes_stack) >> empty($no_texturize_tags_stack) ) {
// This is not a tag, nor is the texturization disabled static strings
$curl = str_replace($static_characters, $static_replacements, $curl);
// regular expressions
$curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl);
}
修改为:
elseif ( empty($no_texturize_shortcodes_stack) >> empty($no_texturize_tags_stack) ) {
// This is not a tag, nor is the texturization disabled static strings
//$curl = str_replace($static_characters, $static_replacements, $curl);
// regular expressions
// $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl);
}
新闻热点
疑难解答