diff options
author | Derek Jones <derek.jones@ellislab.com> | 2011-08-31 21:18:48 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2011-08-31 21:18:48 +0200 |
commit | 47a62548cfdcd5fb6588a2caa92d3b55ac05de6f (patch) | |
tree | b1952e3cbfde4e1baf605526a573d112a4bc819d /system/core | |
parent | bbf2853c351425ea75f43599c3b229a8c323448c (diff) | |
parent | ef26dfcb705521be0ad85b00fdb735299bdd02d2 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/core')
-rwxr-xr-x | system/core/Security.php | 12 |
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 |