HTMLPurifier破坏图像 [英] HTMLPurifier Breaking Images
本文介绍了HTMLPurifier破坏图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在所见即所得(CK编辑器)的用户输入上运行HTMLPurifier,并且图像损坏。
I'm trying to run HTMLPurifier on user input from a WYSIWYG (CK Editor) and the images are breaking.
未过滤的输入:
<img alt="laugh" src="/lib/ckeditor/plugins/smiley/images/teeth_smile.gif" title="laugh">
使用默认设置运行净化器后:
After running through purifier with default settings:
<img alt=""laugh"" src="%5C" title=""laugh"">
我尝试更改配置设置;但是我永远不会保留src。有什么想法吗?
I have tried changing the configuration settings; but I the src is never preserved. Any thoughts?
推荐答案
我怀疑magic_quotes可能是原因。.?
I have a suspicion that magic_quotes could be a reason..?
您还尝试了 $ config-> set('Core.RemoveInvalidImg',true);
。您正在使用哪个版本? (尝试使用新旧版本)
Also did you try $config->set('Core.RemoveInvalidImg',true);
. Which version are you using? (Try older or newer)
这篇关于HTMLPurifier破坏图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文