Class HTMLPurifier_HTMLDefinition

Description

Definition of the purified HTML that describes allowed children, attributes, and many other things.

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.

Located in /library/HTMLPurifier/HTMLDefinition.php (line 26)

HTMLPurifier_Definition
   |
   --HTMLPurifier_HTMLDefinition
Variable Summary
Method Summary
HTMLPurifier_HTMLDefinition __construct ()
void addAttribute ($element_name $element_name, $attr_name $attr_name, $def $def)
void addBlankElement ( $element_name)
void addElement ( $element_name,  $type,  $contents,  $attr_collections,  $attributes)
void doSetup ( $config)
void parseTinyMCEAllowedList ($list $list, array($allowed_elements, $allowed_attributes))
void processModules ( $config)
void setupConfigStuff ( $config)
Variables
mixed $doctype (line 87)

Doctype object

Doctype object

  • access: public
mixed $info = array() (line 34)

Associative array of element names to HTMLPurifier_ElementDef

Associative array of element names to HTMLPurifier_ElementDef

  • access: public
mixed $info_attr_transform_post = array() (line 71)

Indexed list of HTMLPurifier_AttrTransform to be performed after validation.

Indexed list of HTMLPurifier_AttrTransform to be performed after validation.

  • access: public
mixed $info_attr_transform_pre = array() (line 66)

Indexed list of HTMLPurifier_AttrTransform to be performed before validation.

Indexed list of HTMLPurifier_AttrTransform to be performed before validation.

  • access: public
mixed $info_block_wrapper = 'p' (line 56)

String name of element used to wrap inline elements in block context

String name of element used to wrap inline elements in block context

  • access: public
mixed $info_content_sets = array() (line 77)

Nested lookup array of content set name (Block, Inline) to element name to whether or not it belongs in that content set.

Nested lookup array of content set name (Block, Inline) to element name to whether or not it belongs in that content set.

  • access: public
mixed $info_global_attr = array() (line 39)

Associative array of global attribute name to attribute definition.

Associative array of global attribute name to attribute definition.

  • access: public
mixed $info_injector = array() (line 82)

Indexed list of HTMLPurifier_Injector to be used.

Indexed list of HTMLPurifier_Injector to be used.

  • access: public
mixed $info_parent = 'div' (line 44)

String name of parent element HTML will be going into.

String name of parent element HTML will be going into.

  • access: public
mixed $info_parent_def (line 50)

Definition for parent element, allows parent element to be a tag that's not allowed inside the HTML fragment.

Definition for parent element, allows parent element to be a tag that's not allowed inside the HTML fragment.

  • access: public
mixed $info_tag_transform = array() (line 61)

Associative array of deprecated tag name to HTMLPurifier_TagTransform

Associative array of deprecated tag name to HTMLPurifier_TagTransform

  • access: public
mixed $manager (line 156)
  • access: public
mixed $type = 'HTML' (line 155)
  • access: public

Redefinition of:
HTMLPurifier_Definition::$type
What type of definition is it?

Inherited Variables

Inherited from HTMLPurifier_Definition

HTMLPurifier_Definition::$setup
Methods
Constructor __construct (line 161)

Performs low-cost, preliminary initialization.

Performs low-cost, preliminary initialization.

  • access: public
HTMLPurifier_HTMLDefinition __construct ()
addAttribute (line 102)

Adds a custom attribute to a pre-existing element

Adds a custom attribute to a pre-existing element

  • access: public
void addAttribute ($element_name $element_name, $attr_name $attr_name, $def $def)
  • $element_name $element_name: String element name to add attribute to
  • $attr_name $attr_name: String name of attribute
  • $def $def: Attribute definition, can be string or object, see HTMLPurifier_AttrTypes for details
addBlankElement (line 131)

Adds a blank element to your HTML definition, for overriding

Adds a blank element to your HTML definition, for overriding existing behavior

  • access: public
void addBlankElement ( $element_name)
  • $element_name
addElement (line 117)

Adds a custom element to your HTML definition

Adds a custom element to your HTML definition

  • access: public
void addElement ( $element_name,  $type,  $contents,  $attr_collections,  $attributes)
  • $element_name
  • $type
  • $contents
  • $attr_collections
  • $attributes
doSetup (line 165)
  • access: protected
void doSetup ( $config)
  • $config

Redefinition of:
HTMLPurifier_Definition::doSetup()
Sets up the definition object into the final form, something
getAnonymousModule (line 142)

Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module.

Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module.

  • access: public
void getAnonymousModule ()
parseTinyMCEAllowedList (line 387)

Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing.

Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing. Format is element[attr1|attr2],element2...

  • todo: Give this its own class, probably static interface
  • access: public
void parseTinyMCEAllowedList ($list $list, array($allowed_elements, $allowed_attributes))
  • array($allowed_elements, $allowed_attributes)
  • $list $list: String list to parse
processModules (line 180)

Extract out the information from the manager

Extract out the information from the manager

  • access: protected
void processModules ( $config)
  • $config
setupConfigStuff (line 220)

Sets up stuff based on config.

Sets up stuff based on config. We need a better way of doing this.

  • access: protected
void setupConfigStuff ( $config)
  • $config

Inherited Methods

Inherited From HTMLPurifier_Definition

HTMLPurifier_Definition::doSetup()
HTMLPurifier_Definition::setup()

Documentation generated on Thu, 19 Jun 2008 18:49:29 -0400 by phpDocumentor 1.4.2