HTMLPurifier_TagTransform_Simple
extends HTMLPurifier_TagTransform
in package
Simple transformation, just change tag name to something else, and possibly add some styling. This will cover most of the deprecated tag cases.
Table of Contents
Properties
- $transform_to : mixed
- Tag name to transform the tag to.
- $style : mixed
Methods
- __construct() : mixed
- transform() : string
- Transforms the obsolete tag into the valid tag.
- prependCSS() : mixed
- Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
Properties
$transform_to
Tag name to transform the tag to.
public
mixed
$transform_to
Tags
$style
protected
mixed
$style
Tags
Methods
__construct()
public
__construct(string $transform_to[, string $style = null ]) : mixed
Parameters
- $transform_to : string
-
Tag name to transform to.
- $style : string = null
-
CSS style to add to the tag
transform()
Transforms the obsolete tag into the valid tag.
public
transform(HTMLPurifier_Token_Tag $tag, HTMLPurifier_Config $config, HTMLPurifier_Context $context) : string
Parameters
- $tag : HTMLPurifier_Token_Tag
- $config : HTMLPurifier_Config
- $context : HTMLPurifier_Context
Return values
stringprependCSS()
Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
protected
prependCSS(array<string|int, mixed> &$attr, string $css) : mixed
Parameters
- $attr : array<string|int, mixed>
-
Attribute array to process (passed by reference)
- $css : string
-
CSS to prepend