Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

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

Defines 1 class

HTMLPurifier_Generator:: (6 methods):
  __construct()
  generateFromTokens()
  generateFromToken()
  generateScriptFromToken()
  generateAttributes()
  escape()


Class: HTMLPurifier_Generator  - X-Ref

Generates HTML from tokens.

__construct($config, $context)   X-Ref

param: HTMLPurifier_Config $config
param: HTMLPurifier_Context $context

generateFromTokens($tokens)   X-Ref
Generates HTML from an array of tokens.

return: string Generated HTML
param: HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token

generateFromToken($token)   X-Ref
Generates HTML from a single token.

return: string Generated HTML
param: HTMLPurifier_Token $token HTMLPurifier_Token object.

generateScriptFromToken($token)   X-Ref
Special case processor for the contents of script tags

return: string
param: HTMLPurifier_Token $token HTMLPurifier_Token object.

generateAttributes($assoc_array_of_attributes, $element = '')   X-Ref
Generates attribute declarations from attribute array.

return: string Generated HTML fragment for insertion.
param: array $assoc_array_of_attributes Attribute array
param: string $element Name of element attributes are for, used to check

escape($string, $quote = null)   X-Ref
Escapes raw text data.

return: string escaped data.
param: string $string String data to escape for HTML.
param: int $quote Quoting style, like htmlspecialchars. ENT_NOQUOTES is