You are here

function my_xml_escape in Recipe 6

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

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(
    '&' => '&',
    '<' => '&lt;',
    '>' => '&gt;',
    '"' => '&quot;',
    '\'' => '&apos;',
  );
  return str_replace(array_keys($chars), array_values($chars), $string);
}