From 73fe1039ea79da3b0aad1a2bc817d71395e79be8 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 20 Oct 2008 15:51:59 +0000 Subject: The input filter now deals with two-dimensional input arrays. git-svn-id: https://code.elgg.org/elgg/trunk@2285 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/input.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/lib/input.php b/engine/lib/input.php index 23fa4b8b8..4cd5b0a4f 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -38,7 +38,13 @@ { global $CONFIG; if (@include_once(dirname(dirname(dirname(__FILE__)))) . "/vendors/kses/kses.php") { - $var = kses($var, $CONFIG->allowedtags, $CONFIG->allowedprotocols); + if (!is_array($var)) { + $var = kses($var, $CONFIG->allowedtags, $CONFIG->allowedprotocols); + } else { + foreach($var as $key => $el) { + $var[$key] = kses($el, $CONFIG->allowedtags, $CONFIG->allowedprotocols); + } + } } } -- cgit v1.2.3