mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-07 14:46:48 +02:00
feat: Allow universal CSS values for all properties (#410)
This commit is contained in:
@@ -120,8 +120,10 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness
|
||||
$this->assertDef('text-transform:capitalize;destroy:it;',
|
||||
'text-transform:capitalize;');
|
||||
|
||||
// inherit works for everything
|
||||
// universal values work for everything
|
||||
$this->assertDef('text-align:inherit;');
|
||||
$this->assertDef('text-align:initial;');
|
||||
$this->assertDef('text-align:unset;');
|
||||
|
||||
// bad props
|
||||
$this->assertDef('nodice:foobar;', false);
|
||||
|
@@ -88,6 +88,13 @@ class HTMLPurifier_Filter_ExtractStyleBlocksTest extends HTMLPurifier_Harness
|
||||
$this->assertCleanCSS("a .foo #id div.cl#foo {\nfont-weight:700\n}");
|
||||
}
|
||||
|
||||
public function test_cleanCSS_universals()
|
||||
{
|
||||
$this->assertCleanCSS("a {\nfont-weight:inherit\n}");
|
||||
$this->assertCleanCSS("a {\nfont-weight:initial\n}");
|
||||
$this->assertCleanCSS("a {\nfont-weight:unset\n}");
|
||||
}
|
||||
|
||||
public function test_cleanCSS_angledBrackets()
|
||||
{
|
||||
// [Content] No longer can smuggle in angled brackets using
|
||||
|
Reference in New Issue
Block a user