HTMLPurifier 4.4.0
|
00001 <?php 00002 00006 class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef 00007 { 00008 public $def, $element; 00009 00014 public function __construct($def, $element) { 00015 $this->def = $def; 00016 $this->element = $element; 00017 } 00021 public function validate($string, $config, $context) { 00022 $token = $context->get('CurrentToken', true); 00023 if ($token && $token->name == $this->element) return false; 00024 return $this->def->validate($string, $config, $context); 00025 } 00026 } 00027 00028 // vim: et sw=4 sts=4