Bug #8803: Fix urlencoding of parameters.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 31 Dec 2009 08:14:32 +0000 (01:14 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 31 Dec 2009 08:16:15 +0000 (01:16 -0700)
http_build_query() does urlencode()-ish encoding, not rawurlencode()-ish
encoding. We need the latter to ensure that we always handle spaces
correctly (i.e. javascript code does not like '+' encoding for spaces -
it wants '%20' instead).

framework/Core/lib/Horde.php

index 448176f..bca8e1b 100644 (file)
@@ -2257,7 +2257,7 @@ HTML;
             $params->width = $options['width'];
         }
         if (!empty($options['params'])) {
-            $params->params = http_build_query($options['params']);
+            $params->params = http_build_query(array_map('rawurlencode', $options['params']));
         }
         if (!empty($options['menu'])) {
             $params->menu = 1;