如何使用HTMLpurifier将某些属性列入白名单? 我希望HTMLpurifier删除所有其他的,不允许的属性。
答案 0 :(得分:1)
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
的{{1}},target=""
,AllowedRel
,AllowedRev
一样,......没有多少选择,只能进行彻底的测试。