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

Add <style> support to allowStyles API #98

Open
emersion opened this issue Jan 16, 2020 · 4 comments
Open

Add <style> support to allowStyles API #98

emersion opened this issue Jan 16, 2020 · 4 comments

Comments

@emersion
Copy link

douceur already supports parsing full CSS stylesheets. Would you accept a patch sanitizing <style> elements content in addition to style attributes?

@grafana-dee
Copy link
Contributor

Yes.

So long as there were a policy construction interface along the lines of the HTML sanitization policy builder, I'd definitely accept a PR that did this.

@emersion
Copy link
Author

emersion commented Apr 2, 2020

We already sanitize style attributes. The same should be applied to declarations in <style> elements.

@emersion
Copy link
Author

emersion commented Apr 2, 2020

What you're talking about is already done:

func (p *Policy) sanitizeStyles(attr html.Attribute, elementName string) html.Attribute {

@Simerax
Copy link

Simerax commented Nov 14, 2023

Any Update on this?

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

3 participants