aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
commit99679d06884120c57f43b44e55e03595f1f87bed (patch)
treea3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php
parent655214ab30ee84884dc408488b85586f36263fcb (diff)
parentd3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff)
downloadwallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.gz
wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.zst
wallabag-99679d06884120c57f43b44e55e03595f1f87bed.zip
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php')
-rw-r--r--inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php
new file mode 100644
index 00000000..0f481bfd
--- /dev/null
+++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php
@@ -0,0 +1,37 @@
1<?php
2
3/**
4 * Defines a mutation of an obsolete tag into a valid tag.
5 */
6abstract class HTMLPurifier_TagTransform
7{
8
9 /**
10 * Tag name to transform the tag to.
11 * @type string
12 */
13 public $transform_to;
14
15 /**
16 * Transforms the obsolete tag into the valid tag.
17 * @param HTMLPurifier_Token_Tag $tag Tag to be transformed.
18 * @param HTMLPurifier_Config $config Mandatory HTMLPurifier_Config object
19 * @param HTMLPurifier_Context $context Mandatory HTMLPurifier_Context object
20 */
21 abstract public function transform($tag, $config, $context);
22
23 /**
24 * Prepends CSS properties to the style attribute, creating the
25 * attribute if it doesn't exist.
26 * @warning Copied over from AttrTransform, be sure to keep in sync
27 * @param array $attr Attribute array to process (passed by reference)
28 * @param string $css CSS to prepend
29 */
30 protected function prependCSS(&$attr, $css)
31 {
32 $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
33 $attr['style'] = $css . $attr['style'];
34 }
35}
36
37// vim: et sw=4 sts=4