Permalink
Browse files
Remove two instances of eval() (one unused, one old)
- Loading branch information...
Showing
with
3 additions
and
20 deletions.
-
+2
−2
Legislative Insight.js
-
+1
−18
National Library of Australia (new catalog).js
|
@@ -9,7 +9,7 @@ |
|
|
|
"inRepository": true, |
|
|
|
"translatorType": 4, |
|
|
|
"browserSupport": "gcsb", |
|
|
|
"lastUpdated": "2015-04-10 10:10:29" |
|
|
|
"lastUpdated": "2016-03-14 15:46:49" |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
@@ -360,7 +360,7 @@ function process(accNo, pubLaw, type, typeText) |
|
|
|
var i; |
|
|
|
var obj; |
|
|
|
|
|
|
|
var objarr = eval('(' + text + ')'); |
|
|
|
var objarr = JSON.parse(text); |
|
|
|
|
|
|
|
for (i=0; i < objarr.length; i++) |
|
|
|
{ |
|
|
|
@@ -9,7 +9,7 @@ |
|
|
|
"inRepository": true, |
|
|
|
"translatorType": 4, |
|
|
|
"browserSupport": "gcsibv", |
|
|
|
"lastUpdated": "2013-04-17 19:42:02" |
|
|
|
"lastUpdated": "2016-03-14 15:46:49" |
|
|
|
} |
|
|
|
|
|
|
|
function detectWeb(doc, url) { |
|
@@ -60,23 +60,6 @@ function computeFormat(format){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// TODO: Remove this when we drop support for Fx3 |
|
|
|
if (!JSON) { |
|
|
|
var JSON = new function() { |
|
|
|
this.parse = function (arg) { |
|
|
|
var j; |
|
|
|
if (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(arg. |
|
|
|
replace(/\\./g, '@'). |
|
|
|
replace(/"[^"\\\n\r]*"/g, ''))) { |
|
|
|
// Friendly AMO reviewer: This is the official json.org library and is safe. |
|
|
|
j = eval('(' + arg + ')'); |
|
|
|
return j; |
|
|
|
} |
|
|
|
throw new SyntaxError('parseJSON'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function load_item(responseText, url, format) { |
|
|
|
var metadata = JSON.parse(Zotero.Utilities.trimInternal(responseText)); |
|
|
|
var bibid = url.match("^.*\/Record/([0-9]+)")[1]; |
|
|
0 comments on commit
0ef37cc