\HTMLPurifier_AttrDef
Base class for all validating attribute definitions.
This family of classes forms the core for not only HTML attribute validation,
but also any sort of string that needs to be validated or cleaned (which
means CSS properties and composite definitions are defined here too).
Besides defining (through code) what precisely makes the string valid,
subclasses are also responsible for cleaning the code if possible.
Synopsis
class HTMLPurifier_AttrDef
{
- // members
- public boolean $minimized = false;
- public boolean $required = false;
- // methods
- public abstract void validate()
- public void parseCDATA()
- public Created make()
- protected void mungeRgb()
- protected void expandCSSEscape()
Members
public
-
$minimized
Tells us whether or not an HTML attribute is minimized. Has no meaning in other contexts. -
$required
Tells us whether or not an HTML attribute is required. Has no meaning in other contexts
Methods
protected
- expandCSSEscape() — Parses a possibly escaped CSS string and returns the "pure" version of it.
- mungeRgb() — Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. THIS IS A HACK!
public
- make() — Factory method for creating this class from a string.
- parseCDATA() — Convenience method that parses a string as if it were CDATA.
- validate() — Validates and cleans passed string according to a definition.