Hi, thanks for the great library.
I understand that !important is removed by design for security reasons.
In our case, we’re sanitizing trusted HTML and only need !important for font-family.
Would it be possible to have an opt-in option for this, so the default behavior stays secure but we can enable it if needed?
Example:
HTML content (input):
<div style="font-family: Arial, sans-serif !important;"></div>
After sanitization (current behavior)
<div style="font-family: Arial, sans-serif"></div>
Expected behavior
<div style="font-family: Arial, sans-serif !important;"></div>
Thanks!
Hi, thanks for the great library.
I understand that
!importantis removed by design for security reasons.In our case, we’re sanitizing trusted HTML and only need !important for font-family.
Would it be possible to have an opt-in option for this, so the default behavior stays secure but we can enable it if needed?
Example:
HTML content (input):
<div style="font-family: Arial, sans-serif !important;"></div>After sanitization (current behavior)
<div style="font-family: Arial, sans-serif"></div>Expected behavior
<div style="font-family: Arial, sans-serif !important;"></div>Thanks!