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