Skip to content
Permalink
Browse files

Remove two instances of eval() (one unused, one old)

  • Loading branch information...
dstillman committed Mar 14, 2016
1 parent 2b7c547 commit 0ef37cc957c3faf5ac6b4dd6c8f1b89e00b8402b
Showing with 3 additions and 20 deletions.
  1. +2 −2 Legislative Insight.js
  2. +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

Please sign in to comment.
You can’t perform that action at this time.