function Standard::needsRemoval

Same name and namespace in other branches
  1. 8.9.x core/modules/editor/src/EditorXssFilter/Standard.php \Drupal\editor\EditorXssFilter\Standard::needsRemoval()
  2. 10 core/modules/editor/src/EditorXssFilter/Standard.php \Drupal\editor\EditorXssFilter\Standard::needsRemoval()
  3. 11.x core/modules/editor/src/EditorXssFilter/Standard.php \Drupal\editor\EditorXssFilter\Standard::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.

Overrides Xss::needsRemoval

File

core/modules/editor/src/EditorXssFilter/Standard.php, line 166

Class

Standard
Defines the standard text editor XSS filter.

Namespace

Drupal\editor\EditorXssFilter

Code

protected static function needsRemoval($html_tags, $elem) {
  // See static::filterXss() about how this class uses blacklisting instead
  // of the normal whitelisting.
  return !parent::needsRemoval($html_tags, $elem);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.