1: <?php
2:
3: 4: 5:
6: class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
7: {
8: public $def, $element;
9:
10: 11: 12: 13:
14: public function __construct($def, $element) {
15: $this->def = $def;
16: $this->element = $element;
17: }
18: 19: 20:
21: public function validate($string, $config, $context) {
22: $token = $context->get('CurrentToken', true);
23: if ($token && $token->name == $this->element) return false;
24: return $this->def->validate($string, $config, $context);
25: }
26: }
27:
28:
29: