function finder_sanitize in Finder 7.2
Same name and namespace in other branches
- 6 finder.module \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.
2 calls to finder_sanitize()
- finder_build_style_render in includes/
build.inc - Does stuff during the style plugin's render.
- theme_finder_results in includes/
theme.inc - Theme the finder results.
File
- includes/
build.inc, line 480 - The finder build functions.
Code
function finder_sanitize($option, $filter = 'filter_xss') {
switch ($filter) {
case 'filter_xss':
case 'filter_xss_admin':
case 'check_plain':
case 'check_url':
case 'strip_tags':
$option = $filter($option);
break;
default:
$option = check_markup($option, $filter, FALSE);
}
return $option;
}