From 7bacdb435369334dd78a6dae5498338fa90f96ac Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 7 Jun 2006 09:34:11 +0000 Subject: [PATCH] - Patch #59038 by nedjo: drupal.js parseJson() should allow valid [ first character --- misc/drupal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/drupal.js b/misc/drupal.js index 6bbe8fc7439..539338ea344 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 + ');');