Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed !important from CSS styles #7

Open
twistedpair opened this issue Jul 3, 2019 · 1 comment
Open

Removed !important from CSS styles #7

twistedpair opened this issue Jul 3, 2019 · 1 comment

Comments

@twistedpair
Copy link

This library is great, but it removed !important from CSS blocks.

var stripJs = require('strip-js')
stripJs('<html><body style="color:green !important;" onload="alert()">bob</body></html>')

> '<html><body style="color:green">bob</body></html>'

Tested on

  • npm 6.4.1
  • Node v8.15.1
@Nashorn
Copy link

Nashorn commented Jul 19, 2020

Might be an issue in sanatize-html, another npm module that strip-js uses before stripping js.
see:
https://github.com/apostrophecms/sanitize-html/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants