Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 493 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTMLPurifier_HTMLDefinition:: (9 methods):
  addAttribute()
  addElement()
  addBlankElement()
  getAnonymousModule()
  __construct()
  doSetup()
  processModules()
  setupConfigStuff()
  parseTinyMCEAllowedList()


Class: HTMLPurifier_HTMLDefinition  - X-Ref

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.

addAttribute($element_name, $attr_name, $def)   X-Ref
Adds a custom attribute to a pre-existing element

param: string $element_name Element name to add attribute to
param: string $attr_name Name of attribute
param: mixed $def Attribute definition, can be string or object, see

addElement($element_name, $type, $contents, $attr_collections, $attributes = array()   X-Ref
Adds a custom element to your HTML definition


addBlankElement($element_name)   X-Ref
Adds a blank element to your HTML definition, for overriding
existing behavior

param: string $element_name
return: HTMLPurifier_ElementDef

getAnonymousModule()   X-Ref
Retrieves a reference to the anonymous module, so you can
bust out advanced features without having to make your own
module.

return: HTMLPurifier_HTMLModule

__construct()   X-Ref
Performs low-cost, preliminary initialization.


doSetup($config)   X-Ref

param: HTMLPurifier_Config $config

processModules($config)   X-Ref
Extract out the information from the manager

param: HTMLPurifier_Config $config

setupConfigStuff($config)   X-Ref
Sets up stuff based on config. We need a better way of doing this.

param: HTMLPurifier_Config $config

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

param: array $list String list to parse
return: array