function filter_xss_admin

Applies a very permissive XSS/HTML filter for admin-only use.

Use only for fields where it is impractical to use the whole filter system, but where some (mainly inline) mark-up is desired (so check_plain() is not acceptable).

Allows all tags that can be used inside an HTML body, save for scripts and styles.

Parameters

string $string: The string to apply the filter to.

Return value

string The filtered string.

See also

\Drupal\Component\Utility\Xss::filterAdmin()

Related topics

43 calls to filter_xss_admin()
ajax_prepare_response in drupal/core/includes/ajax.inc
Converts the return value of a page callback into an Ajax commands array.
bartik_process_maintenance_page in drupal/core/themes/bartik/bartik.theme
Implements hook_process_HOOK() for maintenance-page.html.twig.
bartik_process_page in drupal/core/themes/bartik/bartik.theme
Implements hook_process_HOOK() for page.html.twig.
Boolean::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Boolean.php
Render the field.
CustomBlockTypeListController::buildRow in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php
Overrides \Drupal\Core\Entity\EntityListController::buildRow().

... See full list

1 string reference to 'filter_xss_admin'
_drupal_error_handler_real in drupal/core/includes/errors.inc
Provides custom PHP error handling.

File

drupal/core/includes/common.inc, line 926
Common functions that many Drupal modules will need to reference.

Code

function filter_xss_admin($string) {
  return Xss::filterAdmin($string);
}