From a19f30fdcf042046f88d24745c257fd66c9ddd20 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 11 Aug 2007 06:52:26 +0000 Subject: [PATCH] [2.1.2] Fix silly little typo with border-collapse:separate git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1379 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 4 ++++ library/HTMLPurifier/CSSDefinition.php | 2 +- tests/HTMLPurifier/AttrDef/CSSTest.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) 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;');