Fix problem where stacked AttrTransforms clobber each other.
[htmlpurifier.git] / library / HTMLPurifier / HTMLModule / Name.php
blob3a1271a976600c35ea7b52240c82fb702947d86c
1 <?php
3 class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule
6 public $name = 'Name';
8 public function setup($config) {
9 $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map');
10 foreach ($elements as $name) {
11 $element = $this->addBlankElement($name);
12 $element->attr['name'] = 'CDATA';
13 if (!$config->get('HTML.Attr.Name.UseCDATA')) {
14 $element->attr_transform_post[] = new HTMLPurifier_AttrTransform_NameSync();
21 // vim: et sw=4 sts=4