Class HTMLPurifier_TagTransform_Font

InheritanceHTMLPurifier_TagTransform_Font » HTMLPurifier_TagTransform

Transforms FONT tags to the proper form (SPAN with CSS styling)

This transformation takes the three proprietary attributes of FONT and transforms them into their corresponding CSS attributes. These are color, face, and size.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$transform_to HTMLPurifier_TagTransform_Font

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_size_lookup HTMLPurifier_TagTransform_Font

Public Methods

Hide inherited methods

MethodDescriptionDefined By
transform() HTMLPurifier_TagTransform_Font

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
prependCSS() Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist. HTMLPurifier_TagTransform

Property Details

$_size_lookup protected property
protected $_size_lookup = ['0' => 'xx-small''1' => 'xx-small''2' => 'small''3' => 'medium''4' => 'large''5' => 'x-large''6' => 'xx-large''7' => '300%''-1' => 'smaller''-2' => '60%''+1' => 'larger''+2' => '150%''+3' => '200%''+4' => '300%']
$transform_to public property
public $transform_to 'span'

Method Details

transform() public method

public HTMLPurifier_Token_End|string transform ( $tag, $config, $context )
$tag HTMLPurifier_Token_Tag
$config HTMLPurifier_Config
$context HTMLPurifier_Context