Class HTMLPurifier_HTMLModule
Represents an XHTML 1.1 module, with information on elements, tags and attributes.
Direct known subclasses
HTMLPurifier_HTMLModule_Bdo, HTMLPurifier_HTMLModule_CommonAttributes, HTMLPurifier_HTMLModule_Nofollow, HTMLPurifier_HTMLModule_NonXMLCommonAttributes, HTMLPurifier_HTMLModule_Object, HTMLPurifier_HTMLModule_Presentation, HTMLPurifier_HTMLModule_Proprietary, HTMLPurifier_HTMLModule_Ruby, HTMLPurifier_HTMLModule_SafeEmbed, HTMLPurifier_HTMLModule_SafeObject, HTMLPurifier_HTMLModule_SafeScripting, HTMLPurifier_HTMLModule_Scripting, HTMLPurifier_HTMLModule_Edit, HTMLPurifier_HTMLModule_StyleAttribute, HTMLPurifier_HTMLModule_Tables, HTMLPurifier_HTMLModule_Target, HTMLPurifier_HTMLModule_TargetBlank, HTMLPurifier_HTMLModule_Text, HTMLPurifier_HTMLModule_Tidy, HTMLPurifier_HTMLModule_XMLCommonAttributes, HTMLPurifier_HTMLModule_Forms, HTMLPurifier_HTMLModule_Hypertext, HTMLPurifier_HTMLModule_Iframe, HTMLPurifier_HTMLModule_Image, HTMLPurifier_HTMLModule_Legacy, HTMLPurifier_HTMLModule_List, HTMLPurifier_HTMLModule_NameIndirect known subclasses
HTMLPurifier_HTMLModule_Tidy_Name, HTMLPurifier_HTMLModule_Tidy_Proprietary, HTMLPurifier_HTMLModule_Tidy_Strict, HTMLPurifier_HTMLModule_Tidy_Transitional, HTMLPurifier_HTMLModule_Tidy_XHTML, HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4Note: The public variables in a module should almost directly correspond to the variables in HTMLPurifier_HTMLDefinition. However, the prefix info carries no special meaning in these objects (include it anyway if that's the correspondence though).
Located at x2engine/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
public
|
#
getChildDef(
Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type member variables of the HTMLPurifier_ElementDef class. There is a similar function in HTMLPurifier_HTMLDefinition. |
public
|
#
addElement( string $element, string|boolean $type, string $contents, array $attr_includes = array(), array $attr = array() )
Convenience function that sets up a new element |
public
|
#
addBlankElement( string $element )
Convenience function that creates a totally blank, non-standalone element. |
public
|
#
addElementToContentSet( string $element, string $type )
Convenience function that registers an element to a content set |
public
array
|
#
parseContents( string $contents )
Convenience function that transforms single-string contents into separate content model and content model type |
public
|
#
mergeInAttrIncludes( array & $attr, array $attr_includes )
Convenience function that merges a list of attribute includes into an attribute array. |
public
array
|
#
makeLookup( string $list )
Convenience function that generates a lookup table with boolean true as value. |
public
|
#
setup(
Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available. |
public
mixed
|
$name |
|
#
Short unique string identifier of the module. |
public
array
|
$elements | array() |
#
Informally, a list of elements this module changes. Not used in any significant way. |
public
array
|
$info | array() |
#
Associative array of element names to element definitions. Some definitions may be incomplete, to be merged in later with the full definition. |
public
array
|
$content_sets | array() |
#
Associative array of content set names to content set additions. This is commonly used to, say, add an A element to the Inline content set. This corresponds to an internal variable $content_sets and NOT info_content_sets member variable of HTMLDefinition. |
public
array
|
$attr_collections | array() |
#
Associative array of attribute collection names to attribute collection additions. More rarely used for adding attributes to the global collections. Example is the StyleAttribute module adding the style attribute to the Core. Corresponds to HTMLDefinition's attr_collections->info, since the object's data is only info, with extra behavior associated with it. |
public
array
|
$info_tag_transform | array() |
#
Associative array of deprecated tag name to HTMLPurifier_TagTransform. |
public
array
|
$info_attr_transform_pre | array() |
#
List of HTMLPurifier_AttrTransform to be performed before validation. |
public
array
|
$info_attr_transform_post | array() |
#
List of HTMLPurifier_AttrTransform to be performed after validation. |
public
array
|
$info_injector | array() |
#
List of HTMLPurifier_Injector to be performed during well-formedness fixing. An injector will only be invoked if all of it's pre-requisites are met; if an injector fails setup, there will be no error; it will simply be silently disabled. |
public
boolean
|
$defines_child_def | false |
#
Boolean flag that indicates whether or not getChildDef is implemented. For optimization reasons: may save a call to a function. Be sure to set it if you do implement getChildDef(), otherwise it will have no effect! |
public
boolean
|
$safe | true |
#
Boolean flag whether or not this module is safe. If it is not safe, all of its members are unsafe. Modules are safe by default (this might be slightly dangerous, but it doesn't make much sense to force HTML Purifier, which is based off of safe HTML, to explicitly say, "This is safe," even though there are modules which are "unsafe") |