diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-20 15:51:59 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-20 15:51:59 +0000 |
commit | 73fe1039ea79da3b0aad1a2bc817d71395e79be8 (patch) | |
tree | 9212b164886671e250a0d3f1ed42e35d1db76785 /engine/lib | |
parent | 20669770fc078af0d277eaccd03da70fabf1464b (diff) | |
download | elgg-73fe1039ea79da3b0aad1a2bc817d71395e79be8.tar.gz elgg-73fe1039ea79da3b0aad1a2bc817d71395e79be8.tar.bz2 |
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
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/input.php | 8 |
1 files changed, 7 insertions, 1 deletions
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);
+ }
+ }
} }
|