Closed AdrianNeatu closed 3 years ago
Is there a way to whitelist a tag with any attribute? From what I see, now, I have to specify all attributes I want for a tag in whitelist.
Convenience must sacrifice safety.
@gaoyaoman but does it? :) you speak like someone who didn't have to whitelist SVG embeding ....
I would've hope for something like
whitelist : { svg: '*'}
(for all svg inner tags of course)
Or something like that.
You can try to setup a custom onIgnoreTagAttr
function to allow any attributes, ref: https://github.com/leizongmin/js-xss/#customize-the-handler-function-for-attributes-not-in-the-whitelist
Here is an example: https://github.com/leizongmin/js-xss/issues/118#issuecomment-352865144
Is there a way to whitelist a tag with any attribute? From what I see, now, I have to specify all attributes I want for a tag in whitelist.