function finder_sanitize in Finder 6
Same name and namespace in other branches
- 7.2 includes/build.inc \finder_sanitize()
Sanitize a finder choice.
Parameters
$option: The option object with unsanitized display field.
$filter: The filter to use.
Return value
The option object with sanitized display field.
1 call to finder_sanitize()
- finder_find_choices in ./
finder.module - Postprocessing for returned finder_find options when mode is choices.
File
- ./
finder.module, line 1658 - The finder module.
Code
function finder_sanitize($option, $filter = 'filter_xss') {
switch ($filter) {
case 'filter_xss':
case 'filter_xss_admin':
case 'check_plain':
case 'check_url':
$option->{$option->display_field . '_safe'} = $filter($option->{$option->display_field});
break;
default:
$option->{$option->display_field . '_safe'} = check_markup($option->{$option->display_field}, $filter, FALSE);
}
$option->display_field = $option->display_field . '_safe';
return $option;
}