summaryrefslogtreecommitdiffstats
path: root/system/helpers/xml_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-28 13:44:35 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-28 13:44:35 +0200
commit26c708514e3ca04a1c373efd166b5c17c31e3796 (patch)
tree8c2241630f236733da08770bcbcf9d17461a0f78 /system/helpers/xml_helper.php
parented1aa21dcd5312b2884f140be8c0d2ee94379423 (diff)
parent8f50b6b36cb743be8b70809279e501c20b8e38e2 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-db-driver
Diffstat (limited to 'system/helpers/xml_helper.php')
-rw-r--r--system/helpers/xml_helper.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index f3ff5764c..67fd34b97 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.php
@@ -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