diff --git a/misc/drupal.js b/misc/drupal.js index 6bbe8fc7439a6bb557f2c816a8ceca4205479b33..539338ea3443d42610daa8e8b7a1a6105089f3ec 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -316,7 +316,7 @@ function stopEvent(event) { * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message. */ function parseJson(data) { - if (data.substring(0,1) != '{') { + if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { return { status: 0, data: data.length ? data : 'Unspecified error' }; } return eval('(' + data + ');');