Upgraded html_escape()  - The simplest version.
diff --git a/system/core/Common.php b/system/core/Common.php
index ec44ea8..b5a696c 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -698,16 +698,9 @@
 	 */
 	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);