Implements special behavior for class attribute (normally NMTOKENS)
More...
|
| split ($string, $config, $context) |
|
| filter ($tokens, $config, $context) |
|
| split ($string, $config, $context) |
| Splits a space separated list of tokens into its constituent parts. More...
|
|
| filter ($tokens, $config, $context) |
| Template method for removing certain tokens based on arbitrary criteria. More...
|
|
| mungeRgb ($string) |
| Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. More...
|
|
| expandCSSEscape ($string) |
| Parses a possibly escaped CSS string and returns the "pure" version of it. More...
|
|
|
| validate ($string, $config, $context) |
|
| validate ($string, $config, $context) |
| Validates and cleans passed string according to a definition. More...
|
|
| parseCDATA ($string) |
| Convenience method that parses a string as if it were CDATA. More...
|
|
| make ($string) |
| Factory method for creating this class from a string. More...
|
|
| $minimized = false |
| Tells us whether or not an HTML attribute is minimized. More...
|
|
| $required = false |
| Tells us whether or not an HTML attribute is required. More...
|
|
Implements special behavior for class attribute (normally NMTOKENS)
Definition at line 6 of file Class.php.
◆ filter()
HTMLPurifier_AttrDef_HTML_Class::filter |
( |
|
$tokens, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
|
protected |
Definition at line 17 of file Class.php.
References $ret.
18 $allowed = $config->get(
'Attr.AllowedClasses');
19 $forbidden = $config->get(
'Attr.ForbiddenClasses');
21 foreach ($tokens as $token) {
23 ($allowed === null || isset($allowed[$token])) &&
24 !isset($forbidden[$token]) &&
27 !in_array($token,
$ret,
true)
◆ split()
HTMLPurifier_AttrDef_HTML_Class::split |
( |
|
$string, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
|
protected |
Definition at line 8 of file Class.php.
10 $name = $config->getDefinition(
'HTML')->doctype->name;
11 if ($name ==
"XHTML 1.1" || $name ==
"XHTML 2.0") {
12 return parent::split($string, $config, $context);
14 return preg_split(
'/\s+/', $string);
The documentation for this class was generated from the following file:
- Services/Html/HtmlPurifier/library/HTMLPurifier/AttrDef/HTML/Class.php