ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.07k stars 327 forks source link

How to keep CSS variable #353

Open nmorel opened 1 year ago

nmorel commented 1 year ago

Hello,

How can I configure the library to sanitize style attribute (remove duplicate, etc...) but keep CSS variable please ?
If I give the following html, it removes the style property color because it considers that it's not a valid color I guess.

<span style="color: var(--color-c16);">Hello World !</span>

Thanks !