Jan 26 2008

关闭wordpress的全角转换

Category: 技术ssmax @ 18:08:07

wordpress在显示的时候会对引号之类的做全角转换,可能是为了防止一些网页代码之类的吧,反正搞到我贴代码的时候很烦,编辑n次都不行,今天一个火起看了一下源代码,在wp-includes/formatting.php 里面,屏蔽掉

 // static strings
 // $curl = str_replace($static_characters, $static_replacements, $curl);
 // regular expressions
 // $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl);
 

一个静态转换,一个动态正则转换,懒得看是转换了什么,全部屏蔽,出问题再算。。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.