2008-06-27 19:44:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
public $name = 'Name';
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
public function setup($config) {
|
|
|
|
$elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map');
|
|
|
|
foreach ($elements as $name) {
|
|
|
|
$element = $this->addBlankElement($name);
|
2009-02-21 07:58:30 +00:00
|
|
|
$element->attr['name'] = 'CDATA';
|
2009-03-20 23:34:38 +00:00
|
|
|
if (!$config->get('HTML.Attr.Name.UseCDATA')) {
|
2012-03-17 03:12:16 +00:00
|
|
|
$element->attr_transform_post[] = new HTMLPurifier_AttrTransform_NameSync();
|
2009-03-20 23:34:38 +00:00
|
|
|
}
|
2008-06-27 19:44:27 +00:00
|
|
|
}
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|