function views_handler::sanitize_value
3.x 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.
27 calls to views_handler::sanitize_value()
- views_handler_area_text_custom::render_textarea_custom in handlers/
views_handler_area_text_custom.inc - Render a text area with filter_xss_admin.
- views_handler_field::render in handlers/
views_handler_field.inc - Render the field.
- views_handler_field_accesslog_path::render in modules/
statistics/ views_handler_field_accesslog_path.inc - Render the field.
- views_handler_field_aggregator_category::render in modules/
aggregator/ views_handler_field_aggregator_category.inc - Render the field.
- views_handler_field_aggregator_title_link::render in modules/
aggregator/ views_handler_field_aggregator_title_link.inc - Render the field.
File
- 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;
}