1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-30 19:00:10 +02:00

Fix CSSDefinition Printer problems with important decorator.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2009-02-07 02:57:36 -05:00
parent db218c7b2b
commit 77f57aa264
5 changed files with 12 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
*/
class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
{
protected $def, $element;
public $def, $element;
/**
* @param $def Definition to wrap

View File

@@ -5,7 +5,7 @@
*/
class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_AttrDef
{
protected $def, $allow;
public $def, $allow;
/**
* @param $def Definition to wrap

View File

@@ -158,6 +158,14 @@ class HTMLPurifier_Printer
$class .= $this->getClass($obj->single, $sec_prefix) . ', ';
$class .= $obj->max;
break;
case 'css_denyelementdecorator':
$class .= $this->getClass($obj->def, $sec_prefix) . ', ';
$class .= $obj->element;
break;
case 'css_importantdecorator':
$class .= $this->getClass($obj->def, $sec_prefix);
if ($obj->allow) $class .= ', !important';
break;
}
$class .= ')';
return $class;