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).
$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;