diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-29 10:37:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-29 10:37:40 +0200 |
commit | fd9e46e852d073ae6fb8680f26e9825805104e1c (patch) | |
tree | ab665546f404a61b2a97fa686ce1f7d2a37ffc79 /system/helpers/xml_helper.php | |
parent | 16be2c2489535c79b38688413df26f95adbe0ea3 (diff) | |
parent | 38b2a256758ee8184d354cbdb0eac467118af36b (diff) |
Merge upstream branch
Diffstat (limited to 'system/helpers/xml_helper.php')
-rw-r--r-- | system/helpers/xml_helper.php | 14 |
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 |