diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-06-07 09:34:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-06-07 09:34:11 +0000 |
commit | 7bacdb435369334dd78a6dae5498338fa90f96ac (patch) | |
tree | 34fa0bd46b9dc673a24fd9c3505fccd648007705 | |
parent | b0ba5ef4f5f3fe39a12c85ca8111071d88daff43 (diff) | |
download | brdo-7bacdb435369334dd78a6dae5498338fa90f96ac.tar.gz brdo-7bacdb435369334dd78a6dae5498338fa90f96ac.tar.bz2 |
- Patch #59038 by nedjo: drupal.js parseJson() should allow valid [ first character
-rw-r--r-- | misc/drupal.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/drupal.js b/misc/drupal.js index 6bbe8fc74..539338ea3 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 + ');'); |