1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 22:26:31 +02:00

[1.7.0] Create convenience functions for HTMLModule constructors, HTMLModule_Bdo was hooked up

- Add initial "safe" property for elements, is not set for most though

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1039 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-07 01:51:26 +00:00
parent ac50d333a5
commit 47fe34ad81
6 changed files with 126 additions and 17 deletions

View File

@@ -58,6 +58,7 @@ class HTMLPurifier_ElementDef
/**
* Value of $child->type, used to determine which ChildDef to use,
* used in combination with $content_model.
* @warning This must be lowercase
* @public
*/
var $content_model_type;
@@ -86,6 +87,24 @@ class HTMLPurifier_ElementDef
*/
var $excludes = array();
/**
* Is this element safe for untrusted users to use?
*/
var $safe = false;
/**
* Factory constructor for creating new standalone element defs
* @static
*/
function create($safe, $content_model, $content_model_type, $attr) {
$def = new HTMLPurifier_ElementDef();
$def->safe = (bool) $safe;
$def->content_model = $content_model;
$def->content_model_type = $content_model_type;
$def->attr = $attr;
return $def;
}
/**
* Merges the values of another element definition into this one.
* Values from the new element def take precedence if a value is