2007-04-30 21:19:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* XHTML 1.1 Target Module, defines target attribute in link elements.
|
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
2013-07-16 11:56:14 +00:00
|
|
|
/**
|
|
|
|
* @type string
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $name = 'Target';
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
/**
|
|
|
|
* @param HTMLPurifier_Config $config
|
|
|
|
*/
|
|
|
|
public function setup($config)
|
|
|
|
{
|
2007-05-12 20:54:55 +00:00
|
|
|
$elements = array('a');
|
|
|
|
foreach ($elements as $name) {
|
2008-04-23 02:40:17 +00:00
|
|
|
$e = $this->addBlankElement($name);
|
2007-05-12 20:54:55 +00:00
|
|
|
$e->attr = array(
|
2007-04-30 21:19:15 +00:00
|
|
|
'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|