Inheritance: extends HTMLPurifier_AttrDef
Esempio n. 1
0
 function test_make()
 {
     $factory = new HTMLPurifier_AttrDef_Enum();
     $def = $factory->make('foo,bar');
     $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'bar'));
     $this->assertIdentical($def, $def2);
     $def = $factory->make('s:foo,BAR');
     $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'BAR'), true);
     $this->assertIdentical($def, $def2);
 }
Esempio n. 2
0
 public function validate($string, $config, $context)
 {
     if ($this->valid_values === false) {
         $this->valid_values = $config->get('Attr', 'AllowedFrameTargets');
     }
     return parent::validate($string, $config, $context);
 }