MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / lib / htmlpurifier / HTMLPurifier / Strategy.php
bloba6ab7e8bcabdc89fc6167848b6392b0280e98b56
1 <?php
3 /**
4 * Supertype for classes that define a strategy for modifying/purifying tokens.
5 *
6 * While HTMLPurifier's core purpose is fixing HTML into something proper,
7 * strategies provide plug points for extra configuration or even extra
8 * features, such as custom tags, custom parsing of text, etc.
9 */
11 HTMLPurifier_ConfigSchema::define(
12 'Core', 'EscapeInvalidTags', false, 'bool',
13 'When true, invalid tags will be written back to the document as plain '.
14 'text. Otherwise, they are silently dropped.'
17 class HTMLPurifier_Strategy
20 /**
21 * Executes the strategy on the tokens.
23 * @param $tokens Array of HTMLPurifier_Token objects to be operated on.
24 * @param $config Configuration options
25 * @returns Processed array of token objects.
27 function execute($tokens, $config, &$context) {
28 trigger_error('Cannot call abstract function', E_USER_ERROR);