1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 11:20:13 +02:00

Migrate default attribute collections to their own module, do late-loading of the attribute collection.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@754 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-02-16 03:07:47 +00:00
parent e55babdc53
commit 5c4a0a6785
3 changed files with 41 additions and 30 deletions

View File

@@ -0,0 +1,32 @@
<?php
class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule
{
var $name = 'CommonAttributes';
var $type = 'define';
var $attr_collections = array(
'Core' => array(
0 => array('Style'),
// 'xml:space' => false,
'class' => 'NMTOKENS',
'id' => 'ID',
'title' => 'CDATA',
),
'Lang' => array(
'xml:lang' => false, // see constructor
),
'I18N' => array(
0 => array('Lang'), // proprietary, for xml:lang/lang
),
'Common' => array(
0 => array('Core', 'I18N')
)
);
function HTMLPurifier_HTMLModule_CommonAttributes() {
$this->attr_collections['Lang']['xml:lang'] = new HTMLPurifier_AttrDef_Lang();
}
}
?>