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

scrub_css drops !important rule from shorthand css properties #191

Closed
b7kich opened this issue Aug 25, 2020 · 5 comments
Closed

scrub_css drops !important rule from shorthand css properties #191

b7kich opened this issue Aug 25, 2020 · 5 comments

Comments

@b7kich
Copy link

b7kich commented Aug 25, 2020

Applies to shorthand CSS properties like border, padding, margin, background and their expansions like margin-top, background-color etc.

[1] pry(main)> puts Loofah::fragment('<h1 style="background: black !important; color: white !important; ">got milk?</h1>').scrub!(:prune)
<h1 style="background:black;color: white !important;">got milk?</h1>
@flavorjones
Copy link
Owner

Thanks for reporting this. I'll take a look at the PR at #192 today.

flavorjones pushed a commit to b7kich/loofah that referenced this issue Aug 26, 2020
flavorjones added a commit to b7kich/loofah that referenced this issue Aug 26, 2020
flavorjones added a commit to b7kich/loofah that referenced this issue Aug 26, 2020
@flavorjones
Copy link
Owner

Will ship in v2.7.0 later today.

@flavorjones
Copy link
Owner

https://github.com/flavorjones/loofah/releases/tag/v2.7.0

@b7kich
Copy link
Author

b7kich commented Aug 27, 2020

Thanks for cleaning the code up!

@flavorjones
Copy link
Owner

No, thank you for figuring out the bug and submitting a PR! This was a tricky one. 👍

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