Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / TagTransform.php
blobf5de99ce49cb17aacc658abdbb587b7e168d349e
1 <?php
3 require_once 'HTMLPurifier/Token.php';
5 /**
6 * Defines a mutation of an obsolete tag into a valid tag.
7 */
8 class HTMLPurifier_TagTransform
11 /**
12 * Tag name to transform the tag to.
13 * @public
15 var $transform_to;
17 /**
18 * Transforms the obsolete tag into the valid tag.
19 * @param $tag Tag to be transformed.
20 * @param $config Mandatory HTMLPurifier_Config object
21 * @param $context Mandatory HTMLPurifier_Context object
23 function transform($tag, $config, &$context) {
24 trigger_error('Call to abstract function', E_USER_ERROR);
27 /**
28 * Prepends CSS properties to the style attribute, creating the
29 * attribute if it doesn't exist.
30 * @warning Copied over from AttrTransform, be sure to keep in sync
31 * @param $attr Attribute array to process (passed by reference)
32 * @param $css CSS to prepend
34 function prependCSS(&$attr, $css) {
35 $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
36 $attr['style'] = $css . $attr['style'];