function views_handler::sanitize_value
Same name in other branches
- 7.x-3.x includes/handlers.inc \views_handler::sanitize_value()
Sanitize the value for output.
Parameters
$value: The value being rendered.
$type: The type of sanitization needed. If not provided, check_plain() is used.
28 calls to views_handler::sanitize_value()
- 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.
- views_handler_field_comment::render in modules/
comment/ views_handler_field_comment.inc - Render the field.
File
-
includes/
handlers.inc, line 386
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 'url':
$value = check_url($value);
break;
default:
$value = check_plain($value);
break;
}
return $value;
}