Class HTMLPurifier_AttrTransform_ImgRequired
Transform that supplies default values for the src and alt attributes in img
tags, as well as prevents the img tag from being removed because of a missing
alt tag. This needs to be registered as both a pre and post attribute
transform.
-
HTMLPurifier_AttrTransform
-
HTMLPurifier_AttrTransform_ImgRequired
Methods summary
public
|
#
transform( $attr $attr, $config $config, $context $context )
Abstract: makes changes to the attributes dependent on multiple values.
Abstract: makes changes to the attributes dependent on multiple values.
Parameters
- $attr
$attr Assoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr
- $config
$config Mandatory HTMLPurifier_Config object.
- $context
$context Mandatory HTMLPurifier_Context object
Returns
Processed attribute array.
|