leizongmin / js-xss

Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist
http://jsxss.com
Other
5.19k stars 630 forks source link

Allow only certain items in an attribute? #205

Open jpacitto-stratus opened 4 years ago

jpacitto-stratus commented 4 years ago

Lets say I want to allow a div tag with a style attribute. Can I go further and only allow certain styles to be passed in the style attribute?

For example only allow background-color but not allow width and height?