Jun 22

把这段代码放到 theme 里的 functions.php 文件:

function theme_pre_comment_post( $c) {
	$c['comment_content'] = htmlspecialchars($c['comment_content']);
	return $c;
}
add_filter( 'preprocess_comment', 'theme_pre_comment_post', '', 1);

Related posts:

  1. jQuery延时绑定事件(lazy-bind)
  2. HTTP POST using PHP cURL
  3. 史上最强大的PHP MySQL操作类
  4. 获取动态加载的图片大小的正确方法
  5. 写自己的 http_build_query

Written by ideawu at 2010-06-22 13:54:47 | Views: 5332 | tags:

Leave a Reply

必须登录, 或者浏览器开启JavaScript支持才可以评论!


网站空间,免费试用