From f5cd2c07ea3ad99fedc6b29f0e5e55cfdfc08a36 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 27 Nov 2008 16:14:50 -0500 Subject: [PATCH] Implement 'overflow' CSS property. Signed-off-by: Edward Z. Yang --- INSTALL | 2 -- NEWS | 1 + configdoc/usage.xml | 2 +- library/HTMLPurifier/CSSDefinition.php | 1 + tests/HTMLPurifier/AttrDef/CSSTest.php | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 849d9db1..5d3ace64 100644 --- a/INSTALL +++ b/INSTALL @@ -18,8 +18,6 @@ with these contents. HTML Purifier is PHP 5 only, and is actively tested from PHP 5.0.5 and up. It has no core dependencies with other libraries. PHP 4 support was deprecated on December 31, 2007 with HTML Purifier 3.0.0. -Essential security fixes will be issued for the 2.1.x branch until -August 8, 2008. These optional extensions can enhance the capabilities of HTML Purifier: diff --git a/NEWS b/NEWS index dd1057b2..d28d660b 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ========================== 3.3.0, unknown release date +! Implement CSS property 'overflow' when %CSS.AllowTricky is true. - Fix bug with testEncodingSupportsASCII() algorithm when iconv() implementation does not do the "right thing" with characters not supported in the output set. diff --git a/configdoc/usage.xml b/configdoc/usage.xml index 39e965fb..9a5770b2 100644 --- a/configdoc/usage.xml +++ b/configdoc/usage.xml @@ -38,7 +38,7 @@ - 274 + 275 diff --git a/library/HTMLPurifier/CSSDefinition.php b/library/HTMLPurifier/CSSDefinition.php index 36dfa618..604c4554 100644 --- a/library/HTMLPurifier/CSSDefinition.php +++ b/library/HTMLPurifier/CSSDefinition.php @@ -257,6 +257,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->info['visibility'] = new HTMLPurifier_AttrDef_Enum(array( 'visible', 'hidden', 'collapse' )); + $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll')); } diff --git a/tests/HTMLPurifier/AttrDef/CSSTest.php b/tests/HTMLPurifier/AttrDef/CSSTest.php index adac2646..636103f4 100644 --- a/tests/HTMLPurifier/AttrDef/CSSTest.php +++ b/tests/HTMLPurifier/AttrDef/CSSTest.php @@ -141,6 +141,7 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness $this->config->set('CSS', 'AllowTricky', true); $this->assertDef('display:none;'); $this->assertDef('visibility:visible;'); + $this->assertDef('overflow:scroll;'); } }