diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 69dfb6308f..c242e32839 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1414,8 +1414,8 @@ Zotero.Utilities = { return '' + obj; } } - else if (type == 'string') { - return JSON.stringify(obj); + else if (type == 'string' || typeof obj.toJSON == 'function') { + return JSON.stringify(obj, false, ' '); } else if (type == 'function') { var funcStr = ('' + obj).trim();