summaryrefslogtreecommitdiffstats
path: root/system/helpers/xml_helper.php
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@qvister.se>2012-04-25 12:08:37 +0200
committerAnton Lindqvist <anton@qvister.se>2012-04-25 12:08:37 +0200
commit92f10e837d132f9866626d3f2e0a633b22329ebb (patch)
treee3ade8c7dd46f90690455fb2dcc112d6d015c980 /system/helpers/xml_helper.php
parent210e664abe857ddd267a7ba8713e2318d3e59a9c (diff)
parentf8ae11598ba058ee02cc4f8c82dbab3420756aae (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Conflicts: system/libraries/Cache/Cache.php
Diffstat (limited to 'system/helpers/xml_helper.php')
-rw-r--r--system/helpers/xml_helper.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index 5242193ac..67fd34b97 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* CodeIgniter XML Helpers
*
@@ -42,8 +40,8 @@
/**
* Convert Reserved XML characters to Entities
*
- * @access public
* @param string
+ * @param bool
* @return string
*/
if ( ! function_exists('xml_convert'))
@@ -54,11 +52,11 @@ if ( ! function_exists('xml_convert'))
// Replace entities to temporary markers so that
// ampersands won't get messed up
- $str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
+ $str = preg_replace('/&#(\d+);/', $temp.'\\1;', $str);
if ($protect_all == TRUE)
{
- $str = preg_replace('/&(\w+);/', "$temp\\1;", $str);
+ $str = preg_replace('/&(\w+);/', $temp.'\\1;', $str);
}
$str = str_replace(array('&', '<', '>', '"', "'", '-'),
@@ -66,11 +64,11 @@ if ( ! function_exists('xml_convert'))
$str);
// Decode the temp markers back to entities
- $str = preg_replace('/$temp(\d+);/', '&#\\1;', $str);
+ $str = preg_replace('/'.$temp.'(\d+);/', '&#\\1;', $str);
if ($protect_all == TRUE)
{
- return preg_replace("/$temp(\w+);/", '&\\1;', $str);
+ return preg_replace('/'.$temp.'(\w+);/', '&\\1;', $str);
}
return $str;
@@ -78,4 +76,4 @@ if ( ! function_exists('xml_convert'))
}
/* End of file xml_helper.php */
-/* Location: ./system/helpers/xml_helper.php */
+/* Location: ./system/helpers/xml_helper.php */ \ No newline at end of file