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:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
|
||||
{
|
||||
protected $def, $element;
|
||||
public $def, $element;
|
||||
|
||||
/**
|
||||
* @param $def Definition to wrap
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_AttrDef
|
||||
{
|
||||
protected $def, $allow;
|
||||
public $def, $allow;
|
||||
|
||||
/**
|
||||
* @param $def Definition to wrap
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user