library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
00007 {
00008     protected $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 }

Generated on Thu Jun 19 18:47:25 2008 for HTMLPurifier by  doxygen 1.5.3