You are here

protected static function Xss::needsRemoval in Drupal 9

Same name and namespace in other branches
  1. 8 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 340

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)]);
}