You are here

function field_filter_xss in Drupal 7

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

6 calls to field_filter_xss()
field_default_form in modules/field/field.form.inc
Creates a form element for a field and can populate it with a default value.
field_multiple_value_form in modules/field/field.form.inc
Special handling to create form elements for multiple values.
image_field_widget_form in modules/image/image.field.inc
Implements hook_field_widget_form().
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().

... See full list

1 string reference to 'field_filter_xss'
number_field_formatter_view in modules/field/modules/number/number.module
Implements hook_field_formatter_view().

File

modules/field/field.module, line 756
Attach custom data fields to Drupal entities.

Code

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