HTMLPurifier 4.4.0
HTMLPurifier_AttrDef_CSS Class Reference

Validates the HTML attribute style, otherwise known as CSS. More...

Inheritance diagram for HTMLPurifier_AttrDef_CSS:
HTMLPurifier_AttrDef HTMLPurifier_AttrDef

List of all members.

Public Member Functions

 validate ($css, $config, $context)
 Validates and cleans passed string according to a definition.
 validate ($css, $config, $context)
 Validates and cleans passed string according to a definition.

Detailed Description

Validates the HTML attribute style, otherwise known as CSS.

Note:
We don't implement the whole CSS specification, so it might be difficult to reuse this component in the context of validating actual stylesheet declarations.
If we were really serious about validating the CSS, we would tokenize the styles and then parse the tokens. Obviously, we are not doing that. Doing that could seriously harm performance, but would make these components a lot more viable for a CSS filtering solution.

Definition at line 14 of file CSS.php.


Member Function Documentation

HTMLPurifier_AttrDef_CSS::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Name of the current CSS property being validated.

Reimplemented from HTMLPurifier_AttrDef.

Definition at line 17 of file CSS.php.

References $config, and HTMLPurifier_AttrDef::parseCDATA().

HTMLPurifier_AttrDef_CSS::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Name of the current CSS property being validated.

Reimplemented from HTMLPurifier_AttrDef.

Definition at line 8196 of file HTMLPurifier.standalone.php.

References $config, and HTMLPurifier_AttrDef::parseCDATA().


The documentation for this class was generated from the following files: