function my_xml_escape in Recipe 7.2
Same name and namespace in other branches
- 6 plugins/recipe_recipeML.module \my_xml_escape()
- 7 includes/recipe_recipeML.module \my_xml_escape()
1 call to my_xml_escape()
File
- modules/
recipe_recipeML.module, line 192 - Enables importing and exporting of recipeML format recipes.
Code
function my_xml_escape($string, $remove_html = FALSE) {
if ($remove_html) {
$string = filter_xss($string, array());
}
$chars = array(
'&' => '&',
'<' => '<',
'>' => '>',
'"' => '"',
'\'' => ''',
);
return str_replace(array_keys($chars), array_values($chars), $string);
}