From 2fcd16b467436a13c8a84a4add4e8d113fe1be02 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 3 Oct 2006 16:41:54 +0000 Subject: --- system/libraries/Input.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'system/libraries/Input.php') diff --git a/system/libraries/Input.php b/system/libraries/Input.php index ad7b0c571..41d77a97a 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -230,10 +230,23 @@ class CI_Input { return FALSE; } else - { + { if ($xss_clean === TRUE) { - return $this->xss_clean($_COOKIE[$index]); + if (is_array($_COOKIE[$index])) + { + $cookie = array(); + foreach($_COOKIE[$index] as $key => $val) + { + $cookie[$key] = $this->xss_clean($val); + } + + return $cookie; + } + else + { + return $this->xss_clean($_COOKIE[$index]); + } } else { -- cgit v1.2.3-24-g4f1b