function Standard::getForbiddenTags
Same name in other branches
- 9 core/modules/editor/src/EditorXssFilter/Standard.php \Drupal\editor\EditorXssFilter\Standard::getForbiddenTags()
Get all forbidden tags from a restrictions data structure.
Parameters
array|false $restrictions: Restrictions as returned by FilterInterface::getHTMLRestrictions().
Return value
array An array of forbidden HTML tags.
See also
\Drupal\filter\Plugin\Filter\FilterInterface::getHTMLRestrictions()
1 call to Standard::getForbiddenTags()
- Standard::filterXss in core/
modules/ editor/ src/ EditorXssFilter/ Standard.php - Filters HTML to prevent XSS attacks when a user edits it in a text editor.
File
-
core/
modules/ editor/ src/ EditorXssFilter/ Standard.php, line 154
Class
- Standard
- Defines the standard text editor XSS filter.
Namespace
Drupal\editor\EditorXssFilterCode
protected static function getForbiddenTags($restrictions) {
if ($restrictions === FALSE || !isset($restrictions['forbidden_tags'])) {
return [];
}
else {
return $restrictions['forbidden_tags'];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.