文章标签 ‘wordpe’

之前安装的高亮插件是SyntaxHighlighter Plus,贴上代码后,$this->cache=1;这样代码都经过了htmlspecialchars的处理,变成了$this->cache=1;这样也就算了,一共替换三组经过htmlspecialchars转换的代码

str_replace(’&’,'&’,$code);
str_replace(’<’,'amp;lt;’,$code);
str_replace(’>’,'amp;gt;’,$code);

这样处理后竟然是直接保存了,我修改一次文章,他就替换一次最终的结果是,看下面代码

$smarty->compile_dir=’templates_c/’;
$smarty->cache_dir=’cache/’;
$smarty->caching=1;
$smarty->debugging=0;

真是失败!!!想想修改下代码继续用,可是因为以前听说过 Google Syntax Highlighter for WordPress 完全用JS实现的,这样就不会出现SyntaxHighlighter Plus修改我文章的现象了。

2009年10月14日11:53 | 没有评论
分类: PHP
标签: