You are here

function my_xml_escape in Recipe 7

Same name and namespace in other branches
  1. 6 plugins/recipe_recipeML.module \my_xml_escape()
  2. 7.2 modules/recipe_recipeML.module \my_xml_escape()
1 call to my_xml_escape()
recipe_recipeML_export_single in includes/recipe_recipeML.module

File

includes/recipe_recipeML.module, line 163
recipe_recipeML.module - Enables importing and exporting of recipeML format recipes.

Code

function my_xml_escape($string) {
  $chars = array(
    '&' => '&',
    '<' => '&lt;',
    '>' => '&gt;',
    '"' => '&quot;',
    '\'' => '&apos;',
  );
  return str_replace(array_keys($chars), array_values($chars), $string);
}