Commit 7bacdb43 authored by Dries's avatar Dries

- Patch #59038 by nedjo: drupal.js parseJson() should allow valid [ first character

parent b0ba5ef4
......@@ -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 + ');');
......
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