1 : <?php
2 :
3 : /**
4 : * Defines a mutation of an obsolete tag into a valid tag.
5 : */
6 : abstract class HTMLPurifier_TagTransform
7 1 : {
8 :
9 : /**
10 : * Tag name to transform the tag to.
11 : */
12 : public $transform_to;
13 :
14 : /**
15 : * Transforms the obsolete tag into the valid tag.
16 : * @param $tag Tag to be transformed.
17 : * @param $config Mandatory HTMLPurifier_Config object
18 : * @param $context Mandatory HTMLPurifier_Context object
19 : */
20 : abstract public function transform($tag, $config, $context);
21 :
22 : /**
23 : * Prepends CSS properties to the style attribute, creating the
24 : * attribute if it doesn't exist.
25 : * @warning Copied over from AttrTransform, be sure to keep in sync
26 : * @param $attr Attribute array to process (passed by reference)
27 : * @param $css CSS to prepend
28 : */
29 : protected function prependCSS(&$attr, $css) {
30 0 : $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
31 0 : $attr['style'] = $css . $attr['style'];
32 0 : }
33 :
34 : }
35 :
|