You are here

protected static function Standard::getForbiddenTags in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 160
Contains \Drupal\editor\EditorXssFilter\Standard.

Class

Standard
Defines the standard text editor XSS filter.

Namespace

Drupal\editor\EditorXssFilter

Code

protected static function getForbiddenTags($restrictions) {
  if ($restrictions === FALSE || !isset($restrictions['forbidden_tags'])) {
    return array();
  }
  else {
    return $restrictions['forbidden_tags'];
  }
}