summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2014-08-26 00:49:11 +0200
committerIvan Tcholakov <ivantcholakov@gmail.com>2014-08-26 00:49:11 +0200
commitc851dc511b92d87002d1f338a31eaf76b7cb4350 (patch)
tree80bf51edb2e450196e389e2ce74d49d8320c5b31 /system/core
parent6222437cfec313a33bc1d6546c4de139c4688188 (diff)
Upgraded html_escape() - The simplest version.
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Common.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index ec44ea815..b5a696c68 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -698,16 +698,9 @@ if ( ! function_exists('html_escape'))
*/
function html_escape($var, $double_encode = TRUE)
{
- $double_encode = (bool) $double_encode;
-
if (is_array($var))
{
- if ($double_encode)
- {
- return array_map('html_escape', $var);
- }
-
- return array_map('html_escape', $var, array_fill(0, count($var), FALSE));
+ return array_map('html_escape', $var, array_fill(0, count($var), $double_encode));
}
return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode);