summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-30 00:32:16 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-30 00:32:16 +0200
commitd7a28663344fbb760134b5623b8cb441f4875f80 (patch)
tree388d65d299613c9cd93f5de11fb413be71143cb6 /system/core
parent70e61b5dc0b240c4a3341ca65ad9f2f5254df1b5 (diff)
parent5c9b0d1b5618ade5c6aa70475b08b3066f14ff3e (diff)
Merge pull request #325 from freewil/develop
always use charset config item
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