Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Xss.php

function Xss::needsRemoval

Whether this element needs to be removed altogether.

Parameters

string[] $html_tags: The list of HTML tags.

string $elem: The name of the HTML element.

Return value

bool TRUE if this element needs to be removed.

2 calls to Xss::needsRemoval()
Standard::needsRemoval in core/modules/editor/src/EditorXssFilter/Standard.php
Whether this element needs to be removed altogether.
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(array $html_tags, $elem) {
    return !isset($html_tags[strtolower($elem)]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal