summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorDarren Hill <dchill42@gmail.com>2011-08-31 20:13:02 +0200
committerDarren Hill <dchill42@gmail.com>2011-08-31 20:13:02 +0200
commit054be5beba0b80b861ac170513bd94d73a478663 (patch)
treed4f55e5133f6cb787b0f7f2bab68d16e513eee1c /system/core
parent4d1cd4c56697bc53b5a9899089ab4c978c66e1da (diff)
parentd369077ac6cae25fa51c9840a466e54333300d0a (diff)
Merge branch 'develop' of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Security.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index 342455f27..e99418bdd 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -525,9 +525,17 @@ class CI_Security {
* @param string
* @return string
*/
- public function entity_decode($str, $charset='UTF-8')
+ public function entity_decode($str, $charset = NULL)
{
- if (stristr($str, '&') === FALSE) return $str;
+ if (stristr($str, '&') === FALSE)
+ {
+ return $str;
+ }
+
+ if (empty($charset))
+ {
+ $charset = config_item('charset');
+ }
// The reason we are not using html_entity_decode() by itself is because
// while it is not technically correct to leave out the semicolon