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

Media query property selectors getting swallowed? #121

Closed
dugancathal opened this issue Oct 29, 2014 · 3 comments
Closed

Media query property selectors getting swallowed? #121

dugancathal opened this issue Oct 29, 2014 · 3 comments
Labels
Milestone

Comments

@dugancathal
Copy link

Using your gem, I've noticed some interesting behavior related to CSS parsing.

Sanitize::CSS.stylesheet('@media { p[class="center"] { text-align: center; }}', Sanitize::Config::RELAXED)
=> "@media { p{} { text-align: center; }}"

For some reason, the [] selector is getting stripped out and replaced with an empty rule.

I did a little digging and can't seem to figure out exactly why this is happening and hoped you could shed some light.

Thoughts?

@rgrove
Copy link
Owner

rgrove commented Oct 29, 2014

Definitely looks like a bug. Will investigate. Thanks for the report!

@rgrove rgrove added the bug label Oct 29, 2014
@rgrove rgrove added this to the 3.0.3 milestone Oct 29, 2014
@dugancathal
Copy link
Author

Sweet! Thank you, sir.

@rgrove rgrove closed this as completed in bbb51e6 Oct 29, 2014
@rgrove
Copy link
Owner

rgrove commented Oct 29, 2014

Fixed in Sanitize 3.0.3, which is available now.

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

No branches or pull requests

2 participants