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

[1.7.0] Complete Legacy element and attribute native support.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1115 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-29 16:51:32 +00:00
parent 9c5f01a0cf
commit 426fbd1f97
8 changed files with 159 additions and 35 deletions

View File

@ -139,9 +139,13 @@ class HTMLPurifier_HTMLModule
* @return Reference to created element
*/
function &addBlankElement($element) {
$this->elements[] = $element;
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->standalone = false;
if (!isset($this->info[$element])) {
$this->elements[] = $element;
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->standalone = false;
} else {
trigger_error("Definition for $element already exists in module, cannot redefine");
}
return $this->info[$element];
}