1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-10-16 22:46:06 +02:00

Implement Style Attribute Module, cleanup some attribute collections and add some documentation.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@716 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-02-04 18:27:59 +00:00
parent 129a4ea506
commit 6478c7c2df
5 changed files with 41 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ class HTMLPurifier_AttrCollection
var $info = array(
'Core' => array(
0 => array('Style'),
// 'xml:space' => false,
'class' => 'NMTOKENS',
'id' => 'ID',
@@ -21,10 +22,8 @@ class HTMLPurifier_AttrCollection
'xml:lang' => false, // see constructor
'lang' => false, // see constructor
),
'Events' => array(),
'Style' => array(), // specifically empty
'Common' => array(
0 => array('Core', 'Events', 'I18N', 'Style')
0 => array('Core', 'I18N')
)
);
@@ -39,6 +38,12 @@ class HTMLPurifier_AttrCollection
foreach ($modules as $module) {
foreach ($module->attr_collection as $coll_i => $coll) {
foreach ($coll as $attr_i => $attr) {
if ($attr_i === 0) {
// merge in includes
$info[$coll_i][$attr_i] = array_merge(
$info[$coll_i][$attr_i], $attr);
continue;
}
$info[$coll_i][$attr_i] = $attr;
}
}