1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-02 12:21:09 +02:00

[1.7.0] Implement addBlankElement for non-standalone elements.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1047 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-12 20:54:55 +00:00
parent e0cf214c44
commit cb9c96a2b0
4 changed files with 43 additions and 19 deletions

View File

@@ -158,6 +158,19 @@ class HTMLPurifier_HTMLModule
return $this->info[$element];
}
/**
* Convenience function that creates a totally blank, non-standalone
* element.
* @param $element Name of element to create
* @return Reference to created element
*/
function &addBlankElement($element) {
$this->elements[] = $element;
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->standalone = false;
return $this->info[$element];
}
/**
* Convenience function that registers an element to a content set
* @param Element to register