From 9e9d77b4072de4f8c73e8bbade07a8f27734e4bd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 6 Feb 2010 23:14:56 +0100 Subject: Initial commit Signed-off-by: Florian Pritz --- system/helpers/xml_helper.php | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 system/helpers/xml_helper.php (limited to 'system/helpers/xml_helper.php') diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php new file mode 100644 index 000000000..2a4c808ce --- /dev/null +++ b/system/helpers/xml_helper.php @@ -0,0 +1,62 @@ +","\"", "'", "-"), + array("&", "<", ">", """, "'", "-"), + $str); + + // Decode the temp markers back to entities + $str = preg_replace("/$temp(\d+);/","&#\\1;",$str); + $str = preg_replace("/$temp(\w+);/","&\\1;", $str); + + return $str; + } +} + + +/* End of file xml_helper.php */ +/* Location: ./system/helpers/xml_helper.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b