Commit e4a6ff42 authored by Steven Wittens's avatar Steven Wittens

- #53368: Output stricter (IE5-compatible) JSON

parent 3ead5603
......@@ -1208,7 +1208,7 @@ function drupal_to_js($var) {
case 'object':
$output = array();
foreach ($var as $k => $v) {
$output[] = $k .': '. drupal_to_js($v);
$output[] = drupal_to_js(strval($k)) .': '. drupal_to_js($v);
}
return '{ '. implode(', ', $output) .' }';
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment