1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 13:18:00 +02:00

[1.7.0] Various updates

- Implement addModule(), requires new userModules property
- Remove unnecessary $config passing for getElement(s)
- Revamp HTMLModuleManagerTest
- Fix buggy unit test for unrecognized parent
- Remove anonymous generator member variable from ChildDef_Required

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1063 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-15 02:33:19 +00:00
parent 2cbb3be602
commit 831a09d455
6 changed files with 86 additions and 280 deletions

View File

@@ -198,7 +198,7 @@ class HTMLPurifier_HTMLDefinition
}
}
$this->info = $this->manager->getElements($this->config);
$this->info = $this->manager->getElements();
$this->info_content_sets = $this->manager->contentSets->lookup;
}
@@ -217,15 +217,14 @@ class HTMLPurifier_HTMLDefinition
}
$parent = $this->config->get('HTML', 'Parent');
$def = $this->manager->getElement($parent, $this->config);
$def = $this->manager->getElement($parent, true);
if ($def) {
$this->info_parent = $parent;
$this->info_parent_def = $def;
} else {
trigger_error('Cannot use unrecognized element as parent.',
E_USER_ERROR);
$this->info_parent_def = $this->manager->getElement(
$this->info_parent, $this->config);
$this->info_parent_def = $this->manager->getElement($this->info_parent, true);
}
// support template text