Html Purifier | CSS Tidy | Browser specific proper

2019-06-05 02:48发布

问题:

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e7e7e7');
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e7e7e7));

These kinds of css properties are removed when filtering input. I'm not sure if this is due to CSSTidy or HTML Purifier. I've tried to look in both of the manuals without finding any clues.

回答1:

I just went through this. In case it is confusing, Edward is referring to this:

http://htmlpurifier.org/phorum/read.php?2,6154,6154#msg-6154



回答2:

HTML Purifier will strip out these properties, definitely. CSS Tidy probably will too (though I'm not sure.) You'll need to create custom validation AttrDefs for each of them.