You are here

protected static function Xss::needsRemoval in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Utility/Xss.php \Drupal\Component\Utility\Xss::needsRemoval()
  2. 10 core/lib/Drupal/Component/Utility/Xss.php \Drupal\Component\Utility\Xss::needsRemoval()

Whether this element needs to be removed altogether.

Parameters

$html_tags: The list of HTML tags.

$elem: The name of the HTML element.

Return value

bool TRUE if this element needs to be removed.

1 call to Xss::needsRemoval()
Standard::needsRemoval in core/modules/editor/src/EditorXssFilter/Standard.php
Whether this element needs to be removed altogether.
1 method overrides Xss::needsRemoval()
Standard::needsRemoval in core/modules/editor/src/EditorXssFilter/Standard.php
Whether this element needs to be removed altogether.

File

core/lib/Drupal/Component/Utility/Xss.php, line 334

Class

Xss
Provides helper to filter for cross-site scripting.

Namespace

Drupal\Component\Utility

Code

protected static function needsRemoval($html_tags, $elem) {
  return !isset($html_tags[strtolower($elem)]);
}