commit d245064f87ee61c9353adf7ad761f5aa02c133f9
parent 3fd5fe06a36c5b054258ac8f98f7329cf8ccb320
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 13 Nov 2009 06:22:44 +0000
Add a note to eval() in json.org library
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -2603,7 +2603,8 @@ Zotero.JSON = new function() {
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
-
+
+ // Friendly AMO reviewer: This is the official json.org library and is safe.
j = eval('(' + arg + ')');
// In the optional third stage, we recursively walk the new structure, passing