File "Hypertext.php"
Full Path: /home/spiraleeea/www/spirale/plugins-dist/safehtml/lib/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Hypertext.php
File size: 948 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* HTML5 compliant replacement for {@link HTMLPurifier_HTMLModule_Hypertext},
* defining block-level hypertext links.
*/
class HTMLPurifier_HTMLModule_HTML5_Hypertext extends HTMLPurifier_HTMLModule
{
/**
* @type string
*/
public $name = 'HTML5_Hypertext';
/**
* @param HTMLPurifier_Config $config
*/
public function setup($config)
{
// https://html.spec.whatwg.org/dev/text-level-semantics.html#the-a-element
$a = $this->addElement('a', 'Flow', 'Flow', 'Common', array(
'download' => 'Text',
'href' => 'URI',
'hreflang' => 'Text', // 'LanguageCode',
'rel' => new HTMLPurifier_AttrDef_HTML5_ARel(),
'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget(),
'type' => 'Text',
));
$a->excludes = array('a' => true);
$this->addElementToContentSet('a', 'Inline');
}
}