1. drupal
    1. 8
    2. 7
8 – 7 field_filter_xss($string)

Like filter_xss_admin(), but with a shorter list of allowed tags.

Used for items entered by administrators, like field descriptions, allowed values, where some (mainly inline) mark-up may be desired (so check_plain() is not acceptable).

Related topics

▾ 5 functions call field_filter_xss()

field_default_form in modules/field/
Create a separate form element for each field.
field_multiple_value_form in modules/field/
Special handling to create form elements for multiple values.
list_field_formatter_view in modules/field/modules/list/list.module
Implements hook_field_formatter_view().
number_field_widget_form in modules/field/modules/number/number.module
Implements hook_field_widget_form().
_options_prepare_options in modules/field/modules/options/options.module
Sanitizes the options.


modules/field/field.module, line 786

function field_filter_xss($string) {
  return filter_xss($string, _field_filter_xss_allowed_tags());