diff --git a/NEWS b/NEWS index e80d03c5..88a3d55b 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Implemented Object module for trusted users - Fix non-visible parsing error in DirectLex with empty tags that have slashes inside attribute values. +- Fix typo in CSS definition: border-collapse:seperate; was incorrectly + accepted as valid CSS. Usually non-visible, because this styling is the + default for tables in most browsers. Thanks Brett Zamir for pointing + this out. . Unit test refactoring for one logical test per test function . Config and context parameters in ComplexHarness deprecated: instead, edit the $config and $context member variables diff --git a/library/HTMLPurifier/CSSDefinition.php b/library/HTMLPurifier/CSSDefinition.php index 8de2aa7b..8bb744fb 100644 --- a/library/HTMLPurifier/CSSDefinition.php +++ b/library/HTMLPurifier/CSSDefinition.php @@ -204,7 +204,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->info['border-right'] = new HTMLPurifier_AttrDef_CSS_Border($config); $this->info['border-collapse'] = new HTMLPurifier_AttrDef_Enum(array( - 'collapse', 'seperate')); + 'collapse', 'separate')); $this->info['caption-side'] = new HTMLPurifier_AttrDef_Enum(array( 'top', 'bottom')); diff --git a/tests/HTMLPurifier/AttrDef/CSSTest.php b/tests/HTMLPurifier/AttrDef/CSSTest.php index 2d1b4c60..e38aebc5 100644 --- a/tests/HTMLPurifier/AttrDef/CSSTest.php +++ b/tests/HTMLPurifier/AttrDef/CSSTest.php @@ -67,6 +67,7 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness $this->assertDef('border:1px solid #000;'); $this->assertDef('border-bottom:2em double #FF00FA;'); $this->assertDef('border-collapse:collapse;'); + $this->assertDef('border-collapse:separate;'); $this->assertDef('caption-side:top;'); $this->assertDef('vertical-align:middle;'); $this->assertDef('vertical-align:12px;');