summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsystem/core/Security.php11
-rw-r--r--system/helpers/typography_helper.php7
2 files changed, 13 insertions, 5 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
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 0bb0938a4..82e686e53 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -39,9 +39,7 @@ if ( ! function_exists('nl2br_except_pre'))
function nl2br_except_pre($str)
{
$CI =& get_instance();
-
$CI->load->library('typography');
-
return $CI->typography->nl2br_except_pre($str);
}
}
@@ -86,7 +84,10 @@ if ( ! function_exists('entity_decode'))
{
global $SEC;
- if (empty($charset)) $charset = config_item('charset');
+ if (empty($charset))
+ {
+ $charset = config_item('charset');
+ }
return $SEC->entity_decode($str, $charset);
}