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 |
- Parameters
-
- Returns
- array
Definition at line 31 of file Class.php.
References $ret.
33 $allowed = $config->get(
'Attr.AllowedClasses');
34 $forbidden = $config->get(
'Attr.ForbiddenClasses');
36 foreach ($tokens as $token) {
37 if (($allowed === null || isset($allowed[$token])) &&
38 !isset($forbidden[$token]) &&
41 !in_array($token,
$ret,
true)
◆ split()
HTMLPurifier_AttrDef_HTML_Class::split |
( |
|
$string, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
|
protected |
- Parameters
-
- Returns
- bool|string
Definition at line 14 of file Class.php.
17 $name = $config->getDefinition(
'HTML')->doctype->name;
18 if ($name ==
"XHTML 1.1" || $name ==
"XHTML 2.0") {
19 return parent::split($string, $config, $context);
21 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