ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Definition of the purified HTML that describes allowed children, attributes, and many other things. More...
Public Member Functions | |
addAttribute ($element_name, $attr_name, $def) | |
Adds a custom attribute to a pre-existing element. More... | |
addElement ($element_name, $type, $contents, $attr_collections, $attributes=array()) | |
Adds a custom element to your HTML definition. More... | |
addBlankElement ($element_name) | |
Adds a blank element to your HTML definition, for overriding existing behavior. More... | |
getAnonymousModule () | |
Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module. More... | |
__construct () | |
Performs low-cost, preliminary initialization. More... | |
parseTinyMCEAllowedList ($list) | |
Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing. More... | |
Public Member Functions inherited from HTMLPurifier_Definition | |
setup ($config) | |
Setup function that aborts if already setup. More... | |
Data Fields | |
$info = array() | |
Associative array of element names to HTMLPurifier_ElementDef. More... | |
$info_global_attr = array() | |
Associative array of global attribute name to attribute definition. More... | |
$info_parent = 'div' | |
String name of parent element HTML will be going into. More... | |
$info_parent_def | |
Definition for parent element, allows parent element to be a tag that's not allowed inside the HTML fragment. More... | |
$info_block_wrapper = 'p' | |
String name of element used to wrap inline elements in block context. More... | |
$info_tag_transform = array() | |
Associative array of deprecated tag name to HTMLPurifier_TagTransform. More... | |
$info_attr_transform_pre = array() | |
Indexed list of HTMLPurifier_AttrTransform to be performed before validation. More... | |
$info_attr_transform_post = array() | |
Indexed list of HTMLPurifier_AttrTransform to be performed after validation. More... | |
$info_content_sets = array() | |
Nested lookup array of content set name (Block, Inline) to element name to whether or not it belongs in that content set. More... | |
$info_injector = array() | |
Indexed list of HTMLPurifier_Injector to be used. More... | |
$doctype | |
Doctype object HTMLPurifier_Doctype. More... | |
$type = 'HTML' | |
string More... | |
$manager | |
HTMLPurifier_HTMLModuleManager More... | |
Data Fields inherited from HTMLPurifier_Definition | |
$setup = false | |
Has setup() been called yet? bool. More... | |
$optimized = null | |
If true, write out the final definition object to the cache after setup. More... | |
$type | |
What type of definition is it? string. More... | |
Protected Member Functions | |
doSetup ($config) | |
processModules ($config) | |
Extract out the information from the manager. More... | |
setupConfigStuff ($config) | |
Sets up stuff based on config. More... | |
Protected Member Functions inherited from HTMLPurifier_Definition | |
doSetup ($config) | |
Sets up the definition object into the final form, something not done by the constructor. More... | |
Private Attributes | |
$_anonModule = null | |
Definition of the purified HTML that describes allowed children, attributes, and many other things.
Conventions:
All member variables that are prefixed with info (including the main $info array) are used by HTML Purifier internals and should not be directly edited when customizing the HTMLDefinition. They can usually be set via configuration directives or custom modules.
On the other hand, member variables without the info prefix are used internally by the HTMLDefinition and MUST NOT be used by other HTML Purifier internals. Many of them, however, are public, and may be edited by userspace code to tweak the behavior of HTMLDefinition.
Definition at line 26 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::__construct | ( | ) |
HTMLPurifier_HTMLDefinition::addAttribute | ( | $element_name, | |
$attr_name, | |||
$def | |||
) |
Adds a custom attribute to a pre-existing element.
string | $element_name | Element name to add attribute to |
string | $attr_name | Name of attribute |
mixed | $def | Attribute definition, can be string or object, see HTMLPurifier_AttrTypes for details |
Definition at line 113 of file HTMLDefinition.php.
References $def, $module, and getAnonymousModule().
HTMLPurifier_HTMLDefinition::addBlankElement | ( | $element_name | ) |
Adds a blank element to your HTML definition, for overriding existing behavior.
string | $element_name |
Definition at line 146 of file HTMLDefinition.php.
References $module, and getAnonymousModule().
HTMLPurifier_HTMLDefinition::addElement | ( | $element_name, | |
$type, | |||
$contents, | |||
$attr_collections, | |||
$attributes = array() |
|||
) |
Adds a custom element to your HTML definition.
Definition at line 129 of file HTMLDefinition.php.
References $attributes, $contents, $module, $type, and getAnonymousModule().
|
protected |
HTMLPurifier_Config | $config |
Definition at line 193 of file HTMLDefinition.php.
References $config, processModules(), and setupConfigStuff().
HTMLPurifier_HTMLDefinition::getAnonymousModule | ( | ) |
Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module.
Definition at line 159 of file HTMLDefinition.php.
References $_anonModule.
Referenced by addAttribute(), addBlankElement(), and addElement().
HTMLPurifier_HTMLDefinition::parseTinyMCEAllowedList | ( | $list | ) |
Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing.
Format is element[attr1|attr2],element2...
array | $list | String list to parse |
Definition at line 458 of file HTMLDefinition.php.
References $attributes, $key, $list, and array.
Referenced by setupConfigStuff().
|
protected |
Extract out the information from the manager.
HTMLPurifier_Config | $config |
Definition at line 210 of file HTMLDefinition.php.
References $config, and $module.
Referenced by doSetup().
|
protected |
Sets up stuff based on config.
We need a better way of doing this.
HTMLPurifier_Config | $config |
Definition at line 261 of file HTMLDefinition.php.
References $config, $d, $def, $i, $info, $key, $keys, $name, $tag, $x, array, and parseTinyMCEAllowedList().
Referenced by doSetup().
|
private |
Definition at line 168 of file HTMLDefinition.php.
Referenced by getAnonymousModule().
HTMLPurifier_HTMLDefinition::$doctype |
Doctype object HTMLPurifier_Doctype.
Definition at line 98 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info = array() |
Associative array of element names to HTMLPurifier_ElementDef.
Definition at line 35 of file HTMLDefinition.php.
Referenced by setupConfigStuff().
HTMLPurifier_HTMLDefinition::$info_attr_transform_post = array() |
Indexed list of HTMLPurifier_AttrTransform to be performed after validation.
Definition at line 79 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_attr_transform_pre = array() |
Indexed list of HTMLPurifier_AttrTransform to be performed before validation.
Definition at line 73 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_block_wrapper = 'p' |
String name of element used to wrap inline elements in block context.
string
Definition at line 61 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_content_sets = array() |
Nested lookup array of content set name (Block, Inline) to element name to whether or not it belongs in that content set.
array
Definition at line 86 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_global_attr = array() |
Associative array of global attribute name to attribute definition.
array
Definition at line 41 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_injector = array() |
Indexed list of HTMLPurifier_Injector to be used.
Definition at line 92 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_parent = 'div' |
String name of parent element HTML will be going into.
string
Definition at line 47 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_parent_def |
Definition for parent element, allows parent element to be a tag that's not allowed inside the HTML fragment.
Definition at line 54 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$info_tag_transform = array() |
Associative array of deprecated tag name to HTMLPurifier_TagTransform.
array
Definition at line 67 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$manager |
HTMLPurifier_HTMLModuleManager
Definition at line 180 of file HTMLDefinition.php.
HTMLPurifier_HTMLDefinition::$type = 'HTML' |