2010-09-08 23:14:17 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* XHTML 1.1 Target Module, defines target attribute in link elements.
|
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
2016-02-09 05:06:17 -05:00
|
|
|
/**
|
|
|
|
* @type string
|
|
|
|
*/
|
2010-09-08 23:14:17 -04:00
|
|
|
public $name = 'Target';
|
|
|
|
|
2016-02-09 05:06:17 -05:00
|
|
|
/**
|
|
|
|
* @param HTMLPurifier_Config $config
|
|
|
|
*/
|
|
|
|
public function setup($config)
|
|
|
|
{
|
2010-09-08 23:14:17 -04:00
|
|
|
$elements = array('a');
|
|
|
|
foreach ($elements as $name) {
|
|
|
|
$e = $this->addBlankElement($name);
|
|
|
|
$e->attr = array(
|
|
|
|
'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|