summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorpurandi <free6300@gmail.com>2011-09-04 14:51:23 +0200
committerpurandi <free6300@gmail.com>2011-09-04 14:51:23 +0200
commitab0dbd4b992778678e00ea3f2a3dd4bf5f1ff504 (patch)
tree740d3cabe5e51f18578a72abf6e13e62fba9eb62 /system/core/Security.php
parentdcf3d1bf17e1354ff0a644f390ed590f2e65298b (diff)
parent2eb2557bf1c438d8fb7d612dbb76c6676eaec4d6 (diff)
Merge branch 'develop', remote-tracking branch 'origin/develop' into develop
Diffstat (limited to 'system/core/Security.php')
-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