function views_handler::sanitize_value

cis7 handlers.inc views_handler::sanitize_value($value, $type = NULL)
cle7 handlers.inc views_handler::sanitize_value($value, $type = NULL)
elmsmedia7 handlers.inc views_handler::sanitize_value($value, $type = NULL)
icor7 handlers.inc views_handler::sanitize_value($value, $type = NULL)
meedjum_blog7 handlers.inc views_handler::sanitize_value($value, $type = NULL)
mooc7 handlers.inc views_handler::sanitize_value($value, $type = NULL)

Sanitize the value for output.

Parameters

$value: The value being rendered.

$type: The type of sanitization needed. If not provided, check_plain() is used.

Return value

string Returns the safe value.

32 calls to views_handler::sanitize_value()
entity_views_handler_field_duration::render_single_value in sites/all/modules/ulmus/entity/views/handlers/entity_views_handler_field_duration.inc
Render a single field value.
entity_views_handler_field_entity::render_single_value in sites/all/modules/ulmus/entity/views/handlers/entity_views_handler_field_entity.inc
Render a single field value.
og_handler_field_og_membership_link_delete::render in sites/all/modules/ulmus/og/includes/views/handlers/og_handler_field_og_membership_link_delete.inc
Render the field.
og_handler_field_og_membership_link_edit::render in sites/all/modules/ulmus/og/includes/views/handlers/og_handler_field_og_membership_link_edit.inc
Render the field.
views_handler_area_text_custom::render_textarea_custom in sites/all/modules/ulmus/views/handlers/views_handler_area_text_custom.inc
Render a text area with filter_xss_admin.

... See full list

File

sites/all/modules/ulmus/views/includes/handlers.inc, line 322
Defines the various handler objects to help build and display views.

Class

views_handler
Base handler, from which all the other handlers are derived. It creates a common interface to create consistency amongst handlers and data.

Code

function sanitize_value($value, $type = NULL) {
  switch ($type) {
    case 'xss':
      $value = filter_xss($value);
      break;
    case 'xss_admin':
      $value = filter_xss_admin($value);
      break;
    case 'url':
      $value = check_url($value);
      break;
    default:
      $value = check_plain($value);
      break;
  }
  return $value;
}