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

allow '!important' for style attributes #487

Closed
faxemaxee opened this issue Jul 13, 2021 · 2 comments · Fixed by #522
Closed

allow '!important' for style attributes #487

faxemaxee opened this issue Jul 13, 2021 · 2 comments · Fixed by #522

Comments

@faxemaxee
Copy link

Hey everyone,

I am currently trying to allow the important flag for CSS Attribute inside the style attribute for tags. I did not manage to get it work, the sanitizer always removes the '!important'.

Here is a code sandbox: https://codesandbox.io/s/wizardly-agnesi-64lc2?file=/src/index.js

I tried to use allowStyles but could not figure out the right config, the docs do not mention this specific case.

Looking forward to your answers!

Max

Details

Version of Node.js:
14 LTS

Server Operating System:
Linux

@stale
Copy link

stale bot commented Sep 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2021
@stale stale bot closed this as completed Sep 25, 2021
@caub
Copy link

caub commented Dec 7, 2021

Same issue https://replit.com/@caub/sanitize-html-style-important-issue#index.js

Can we reopen this issue?

@abea abea reopened this Dec 7, 2021
@stale stale bot removed the stale label Dec 7, 2021
@abea abea added the bug label Dec 7, 2021
@abea abea closed this as completed in #522 Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants