From c851dc511b92d87002d1f338a31eaf76b7cb4350 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Tue, 26 Aug 2014 01:49:11 +0300 Subject: Upgraded html_escape() - The simplest version. --- system/core/Common.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'system') 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); -- cgit v1.2.3-24-g4f1b