From 3b537365a4feafb2b73daaa99e82bd23faf35c7a Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 11 Oct 2012 11:39:52 -0700 Subject: [PATCH] CSS properties page-break-* Signed-off-by: Edward Z. Yang --- NEWS | 2 ++ library/HTMLPurifier/CSSDefinition.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 474e3df1..9ce4173f 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Support display:inline-block ! Support for more white-space CSS values. ! Permit underscores in font families +! Support for page-break-* CSS3 properties when proprietary properties + are enabled. - 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 5966d81f..8c4c3127 100644 --- a/library/HTMLPurifier/CSSDefinition.php +++ b/library/HTMLPurifier/CSSDefinition.php @@ -250,6 +250,11 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition // only opacity, for now $this->info['filter'] = new HTMLPurifier_AttrDef_CSS_Filter(); + // more CSS3 + $this->info['page-break-after'] = + $this->info['page-break-before'] = new HTMLPurifier_AttrDef_Enum(array('auto','always','avoid','left','right')); + $this->info['page-break-inside'] = new HTMLPurifier_AttrDef_Enum(array('auto','avoid')); + } protected function doSetupTricky($config) {