A5下载文章资讯

分类分类

关闭wordpress代码自动转义

2015-04-07 16:50作者:zhao

某些情况下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);

}

展开全部

相关

说两句网友评论
    我要跟贴
    取消