首页 > 网站 > 建站经验 > 正文

关闭wordpress代码自动转义

2024-04-25 20:32:13
字体:
来源:转载
供稿:网友

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

}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表