A-A+

KingCMS发布文章“提交的内容中带有非法数据”错误解决方案

2012年09月01日 编程技术 暂无评论

需要在KingCMS的文章内容里加入GOOGLE地图啥的,提示“提交的内容中带有非法数据”,这是因为KingCMS会默认把JS代码过滤掉,为了安全性起见~~~~

打开system/lib/func.php文件,把

[code lang="php"]
case 21:$_is=preg_match("/(<(\/?)(script|base|iframe|style|html|bo dy|title|link|meta|\?|\%)([^>]*?)>|(<[^>]*)\son[a-zA-Z]+\s*=([^>
]*>))/isU",$post);break;
[/code]

修改成

[code lang="php"]
case 21:$_is=preg_match("/(<(\/?)(base|iframe|style|html|body|tit le|link|meta|\?|\%)([^>]*?)>|(<[^>]*)\son[a-zA-Z]+\s*=([^>]*>))/i
sU",$post);break;
[/code]

标签:

给我留言