4.7.x filter.module filter_xss_admin($string)
5.x filter.module filter_xss_admin($string)
6.x filter.module filter_xss_admin($string)
7.x common.inc filter_xss_admin($string)

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

19 calls to filter_xss_admin()
bartik_process_maintenance_page in themes/bartik/template.php
Override or insert variables into the maintenance page template.
bartik_process_page in themes/bartik/template.php
Override or insert variables into the page template.
FilterUnitTestCase::testFilterXSSAdmin in modules/filter/filter.test
Tests the loose, admin HTML filter.
node_help in modules/node/node.module
Implements hook_help().
PageTitleFiltering::testTitleXSS in modules/system/system.test
Test if the title of the site is XSS proof.

... See full list

File

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',
  ));
}