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

Replace the CSS sanitizer with something that parses CSS #152

Open
gsnedders opened this issue May 19, 2014 · 3 comments
Open

Replace the CSS sanitizer with something that parses CSS #152

gsnedders opened this issue May 19, 2014 · 3 comments

Comments

@gsnedders
Copy link
Member

Currently the sanitizer uses horrible regexp which I have no reason to believe correct whatsoever to parse CSS. We should move to a CSS parser, like https://github.com/SimonSapin/tinycss/.

@pzingg
Copy link

pzingg commented Nov 19, 2015

Also does not parse transform properties with multiple operations:

width: 386.00px; height: 289.50px; margin-left: 0.00px; margin-top: 0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);

@willkg
Copy link
Contributor

willkg commented Feb 21, 2017

@gsnedders Do you want help with this issue? I can test it out with Bleach and then create a PR for html5lib. Would that help?

@gsnedders
Copy link
Member Author

@willkg Yes! Please feel free to. If you want a pointer, you probably want to start at tinycss.CSS21Parser.parse_style_attr.

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

No branches or pull requests

3 participants