• 网站认证
  • 教程:5,345|
  • 话题:4392|
  • 评论:45|
  • 会员:177|
  • 注册
  • 查看作者
  • 软件频道织梦编辑器重新编辑乱码问题解决方法,织梦的安全过滤器

    文章一开始发布时编辑器看是正常的,等发布后文章要二次编辑室就出问题了, 文章里的样式 如:<p style="margin: 0px; padding: 0px; ">aaaaaaaa</p> 这样的等二次编辑室 会出现图上的问题

    style 的st不见了 而且引号“”,和尖括号 <x> 全变成字符显示在源码切换的里面

    下图 数据库存储正常

    织梦安全过滤器 解决方法 适当修改以下代码,(特别是style这怎么可以过滤。。。。无语)

    这3个文件大概78行左右处,织梦测试了一下,只需要修改 后面两个文件即可 改为$replacement = substr($ra[$i], 0, 10); 其中后面的 10是截取前10个字符,也就是基本不过滤¥ra1里面的字符了,困扰很长时间的问题终于解决了!

    1

    $ra1=array('javascript','vbscript','expression','applet','meta','xml','blink','link','style','script','embed','object','iframe','frame','frameset','ilayer','layer','bgsound','title','base');

    2

    $ra2=array('onabort','onactivate','onafterprint','onafterupdate','onbeforeactivate','onbeforecopy','onbeforecut','onbeforedeactivate','onbeforeeditfocus','onbeforepaste','onbeforeprint','onbeforeunload','onbeforeupdate','onblur','onbounce','oncellchange','onchange','onclick','oncontextmenu','oncontrolselect','oncopy','oncut','ondataavailable','ondatasetchanged','ondatasetcomplete','ondblclick','ondeactivate','ondrag','ondragend','ondragenter','ondragleave','ondragover','ondragstart','ondrop','onerror','onerrorupdate','onfilterchange','onfinish','onfocus','onfocusin','onfocusout','onhelp','onkeydown','onkeypress','onkeyup','onlayoutcomplete','onload','onlosecapture','onmousedown','onmouseenter','onmouseleave','onmousemove','onmouseout','onmouseover','onmouseup','onmousewheel','onmove','onmoveend','onmovestart','onpaste','onpropertychange','onreadystatechange','onreset','onresize','onresizeend','onresizestart','onrowenter','onrowexit','onrowsdelete','onrowsinserted','onscroll','onselect','onselectionchange','onselectstart','onstart','onstop','onsubmit','onunload');

    3

    $ra=array_merge($ra1,$ra2);

  • 0
  • 0
  • 0
  • 1.5k
  • 请登录之后再进行评论

    登录
  • 做任务
  • 实时动态
  • 偏好设置
  • 自定义-1
  • 单栏布局 侧栏位置: