【发布时间】:2009-03-21 21:28:00
【问题描述】:
如何使用 HTMLpurifier 将一些属性列入白名单? 我希望 HTMLpurifier 删除所有其他不允许的属性。
【问题讨论】:
标签: attributes whitelist htmlpurifier
如何使用 HTMLpurifier 将一些属性列入白名单? 我希望 HTMLpurifier 删除所有其他不允许的属性。
【问题讨论】:
标签: attributes whitelist htmlpurifier
HTML.AllowedAttributes。请注意when using HTML.AllowedAttributes, you need to also be using HTML.AllowedElements。和you'll probably need to add more as you go along。就像AllowedFrameTargets for target="", AllowedRel, AllowedRev, EnableAttrID, ... 没有太多选择,但要彻底测试。
【讨论】: