2007-02-04 01:01:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'HTMLPurifier/HTMLModule.php';
|
2007-03-31 02:58:16 +00:00
|
|
|
require_once 'HTMLPurifier/AttrDef/HTML/LinkTypes.php';
|
2007-02-04 01:01:27 +00:00
|
|
|
|
|
|
|
/**
|
2007-02-04 04:41:34 +00:00
|
|
|
* XHTML 1.1 Hypertext Module, defines hypertext links. Core Module.
|
2007-02-04 01:01:27 +00:00
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
|
|
|
|
2007-02-14 22:30:17 +00:00
|
|
|
var $name = 'Hypertext';
|
2007-02-04 01:01:27 +00:00
|
|
|
var $elements = array('a');
|
|
|
|
var $info = array();
|
|
|
|
var $content_sets = array('Inline' => 'a');
|
|
|
|
|
|
|
|
function HTMLPurifier_HTMLModule_Hypertext() {
|
|
|
|
$this->info['a'] = new HTMLPurifier_ElementDef();
|
|
|
|
$this->info['a']->attr = array(
|
|
|
|
0 => array('Common'),
|
|
|
|
// 'accesskey' => 'Character',
|
|
|
|
// 'charset' => 'Charset',
|
|
|
|
'href' => 'URI',
|
|
|
|
//'hreflang' => 'LanguageCode',
|
2007-03-31 02:58:16 +00:00
|
|
|
'rel' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rel'),
|
|
|
|
'rev' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rev'),
|
2007-02-04 01:01:27 +00:00
|
|
|
//'tabindex' => 'Number',
|
|
|
|
//'type' => 'ContentType',
|
|
|
|
);
|
|
|
|
$this->info['a']->content_model = '#PCDATA | Inline';
|
2007-02-04 01:52:13 +00:00
|
|
|
$this->info['a']->content_model_type = 'optional';
|
2007-02-04 01:01:27 +00:00
|
|
|
$this->info['a']->excludes = array('a' => true);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|