Implements special behavior for class attribute (normally NMTOKENS)
More...
Protected Member Functions |
| split ($string, $config, $context) |
| filter ($tokens, $config, $context) |
Additional Inherited Members |
| validate ($string, $config, $context) |
| $minimized = false |
| Tells us whether or not an HTML attribute is minimized.
|
| $required = false |
| Tells us whether or not an HTML attribute is required.
|
Detailed Description
Implements special behavior for class attribute (normally NMTOKENS)
Definition at line 6 of file Class.php.
Member Function Documentation
HTMLPurifier_AttrDef_HTML_Class::filter |
( |
|
$tokens, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
|
protected |
- Parameters
-
- Returns
- array
Reimplemented from HTMLPurifier_AttrDef_HTML_Nmtokens.
Definition at line 31 of file Class.php.
References $ret.
{
$allowed = $config->get('Attr.AllowedClasses');
$forbidden = $config->get('Attr.ForbiddenClasses');
foreach ($tokens as $token) {
if (($allowed === null || isset($allowed[$token])) &&
!isset($forbidden[$token]) &&
!in_array($token,
$ret,
true)
) {
}
}
}
HTMLPurifier_AttrDef_HTML_Class::split |
( |
|
$string, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
|
protected |
- Parameters
-
- Returns
- bool|string
Reimplemented from HTMLPurifier_AttrDef_HTML_Nmtokens.
Definition at line 14 of file Class.php.
{
$name = $config->getDefinition('HTML')->doctype->name;
if ($name == "XHTML 1.1" || $name == "XHTML 2.0") {
} else {
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