1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-30 19:00:10 +02:00

[1.5.0] Implement Legacy module.

- Yet another test EnableAttrID
- ElementDef now is mindful of attr inclusion merges

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@732 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-02-11 01:52:56 +00:00
parent 54a68a1713
commit 71e4ddd222
4 changed files with 61 additions and 44 deletions

View File

@@ -93,7 +93,17 @@ class HTMLPurifier_ElementDef
function mergeIn($def) {
// later keys takes precedence
foreach($def->attr as $k => $v) $this->attr[$k] = $v;
foreach($def->attr as $k => $v) {
if ($k == 0) {
// merge in the includes
// sorry, no way to override an include
foreach ($v as $v2) {
$def->attr[0][] = $v2;
}
continue;
}
$this->attr[$k] = $v;
}
foreach($def->attr_transform_pre as $k => $v) $this->attr_transform_pre[$k] = $v;
foreach($def->attr_transform_post as $k => $v) $this->attr_transform_post[$k] = $v;
foreach($def->auto_close as $k => $v) $this->auto_close[$k] = $v;