37        $string = trim($string);
 
   38        $is_important = 
false;
 
   40        if (strlen($string) >= 9 && substr($string, -9) === 
'important') {
 
   41            $temp = rtrim(substr($string, 0, -9));
 
   43            if (strlen($temp) >= 1 && substr($temp, -1) === 
'!') {
 
   44                $string = rtrim(substr($temp, 0, -1));
 
   49        if ($this->allow && $is_important) {
 
   50            $string .= 
' !important';
 
An exception for terminatinating execution or to throw for unit testing.
Decorator which enables !important to be used in CSS values.
__construct($def, $allow=false)
$def
@type HTMLPurifier_AttrDef
validate($string, $config, $context)
Intercepts and removes !important if necessary.
Base class for all validating attribute definitions.