ezyang / htmlpurifier

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

CSS3 rules are deleted #41

Open Bingbazaar opened 9 years ago

Bingbazaar commented 9 years ago

Things like box-shadow, border-radius and linear-gradient() are removed. It's quite a disadvantage for design to not be able to use these properties. Would it be possible to fix this?

ezyang commented 9 years ago

Someone implement them, and PR them in!

Daijobou commented 8 years ago

Have you found a solution for box-shadow and gradient?

solution for rgba found here: https://reviews.mahara.org/#/c/3679/2/htdocs/lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Color.php

border-radius you can found here: https://github.com/ezyang/htmlpurifier/pull/19

Daijobou commented 7 years ago

@ezyang when you want, I can give you my htmlpurifier 4.7.0 source. You can look with WinMerge the differences. I have included the most needed CSS3 features in it. I only missing support for gradient.

teells commented 7 years ago

@Daijobou, would you mind posting your changes? I am also in need of CSS3 support. #19 appears to be in the code, but I still cannot seem to get it to work.