summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorfreewil <sean@eternalrise.com>2011-08-28 18:15:23 +0200
committerfreewil <sean@eternalrise.com>2011-08-28 18:15:23 +0200
commit5c9b0d1b5618ade5c6aa70475b08b3066f14ff3e (patch)
treea5df2e6f1a2a9c0e55d48c102c91ede73ac3c318 /system/core
parent8cc0cfe1ab1e10aad71d14e0b43e05444c00693d (diff)
always use charset config item
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Security.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index cc21ddc91..e99418bdd 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -527,8 +527,15 @@ class CI_Security {
*/
public function entity_decode($str, $charset = NULL)
{
- if (stristr($str, '&') === FALSE) return $str;
- if (empty($charset)) $charset = config_item('charset');
+ 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