shivanshu3 / strip-js

[DEPRECATED] NPM Module which strips out all JavaScript code from some HTML text
MIT License
7 stars 7 forks source link

Customize options for sanitize-html #2

Closed dawnerd closed 6 years ago

dawnerd commented 7 years ago

Would be nice to be able to override the defaults. Would be handy for locking down to a smaller set of allowed elements.

I'd love to do a PR for it too.

shivanshu3 commented 7 years ago

Yup, that would definitely be a nice addition to it! I guess adding a second optional argument to the stripJs function which gets passed down to sanitize-html would suffice? We would just have to make sure that the javascript scheme isn't part of the allowedSchemes option or the allowedSchemesByTag option.

shivanshu3 commented 6 years ago

Fixed by PR #4