How to whitelist just some attributes with HTMLpurifier? I want HTMLpurifier to delete all the other, not allowed attributes.
A:
HTML.AllowedAttributes. Note that when using HTML.AllowedAttributes, you need to also be using HTML.AllowedElements. And you'll probably need to add more as you go along. Like AllowedFrameTargets
for target=""
, AllowedRel
, AllowedRev
, EnableAttrID
, ... Not much choice but testing thoroughly.
ax
2009-03-22 13:25:57
Thats the option, but how can I check, if it isn't overwritten by anything?
2009-03-22 17:37:01
see my updated answer
ax
2009-03-22 18:39:11