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

Sanitizing CSS #323

Open
subbudvk opened this issue Feb 7, 2024 · 3 comments
Open

Sanitizing CSS #323

subbudvk opened this issue Feb 7, 2024 · 3 comments

Comments

@subbudvk
Copy link
Contributor

subbudvk commented Feb 7, 2024

  • Why does CSS Sanitization happening with properties in CSSSchema for style attribute is not happening when we do allowTextIn("style") ?
  • If that's intentional,
    Is there a way to disallow particular property inside style tag for example : background-url?

We can write a preprocessor but i think, CssGrammar where we do sanitization is package specific. Is it a right way to sanitize css in <style>

@mikesamuel @jmanico

@subbudvk
Copy link
Contributor Author

@Dashlet26 If I am not wrong customizing CSS Schema doesn't have effect in <style> tag because allowStyling() API and it's whitelisting are for style attributes.

@Dashlet26
Copy link

Apologies for my previous answer sticking with this one allowStyling() API and its whitelisting they are specially used for style attributes .
Customizing CSS Schema may not have an effect in <style> tag because it is realted to allowStyling() API for style attributes not for styling with <style> tag .
I hope this answer may help you but if not then you can counter me .

@subbudvk
Copy link
Contributor Author

subbudvk commented Mar 25, 2024

@Dashlet26 , Sorry but that's the question. I understand allowStyling() is used for attributes and that's why I replied for the earlier suggestion of customizing CSS Schema.

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