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

4.7.x
Steven Wittens 2006-03-10 17:06:48 +00:00
parent 3ead560368
commit e4a6ff4270
1 changed files with 1 additions and 1 deletions

View File

@ -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: