diff --git a/NEWS b/NEWS index 6c437235..38a3031a 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier transforms in later modules. No internal code was using this but this may break some clients. ! Support display:inline-block +! Support for more white-space CSS values. - Use prepend for SPL autoloading on PHP 5.3 and later. - Fix bug with nofollow transform when pre-existing rel exists. - Fix bug where background:url() always gets lower-cased diff --git a/library/HTMLPurifier/CSSDefinition.php b/library/HTMLPurifier/CSSDefinition.php index c70f37f9..5966d81f 100644 --- a/library/HTMLPurifier/CSSDefinition.php +++ b/library/HTMLPurifier/CSSDefinition.php @@ -208,8 +208,9 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->info['border-spacing'] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2); - // partial support - $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum(array('nowrap')); + // These CSS properties don't work on many browsers, but we live + // in THE FUTURE! + $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum(array('nowrap', 'normal', 'pre', 'pre-wrap', 'pre-line')); if ($config->get('CSS.Proprietary')) { $this->doSetupProprietary($config);