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.

Related topics

23 calls to filter_xss_admin()
ajax_prepare_response in drupal/includes/ajax.inc
Converts the return value of a page callback into an Ajax commands array.
bartik_process_maintenance_page in drupal/themes/bartik/template.php
Override or insert variables into the maintenance page template.
bartik_process_page in drupal/themes/bartik/template.php
Override or insert variables into the page template.
drupal_deliver_html_page in drupal/includes/common.inc
Packages and sends the result of a page callback to the browser as HTML.
FilterUnitTestCase::testFilterXSSAdmin in drupal/modules/filter/filter.test
Tests the loose, admin HTML filter.

... See full list

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

File

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

Code

function filter_xss_admin($string) {
  return filter_xss($string, array(
    'a',
    'abbr',
    'acronym',
    'address',
    'article',
    'aside',
    'b',
    'bdi',
    'bdo',
    'big',
    'blockquote',
    'br',
    'caption',
    'cite',
    'code',
    'col',
    'colgroup',
    'command',
    'dd',
    'del',
    'details',
    'dfn',
    'div',
    'dl',
    'dt',
    'em',
    'figcaption',
    'figure',
    'footer',
    'h1',
    'h2',
    'h3',
    'h4',
    'h5',
    'h6',
    'header',
    'hgroup',
    'hr',
    'i',
    'img',
    'ins',
    'kbd',
    'li',
    'mark',
    'menu',
    'meter',
    'nav',
    'ol',
    'output',
    'p',
    'pre',
    'progress',
    'q',
    'rp',
    'rt',
    'ruby',
    's',
    'samp',
    'section',
    'small',
    'span',
    'strong',
    'sub',
    'summary',
    'sup',
    'table',
    'tbody',
    'td',
    'tfoot',
    'th',
    'thead',
    'time',
    'tr',
    'tt',
    'u',
    'ul',
    'var',
    'wbr',
  ));
}