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:
@@ -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
|
||||
|
Reference in New Issue
Block a user