From: Tim Otten Date: Mon, 5 Jan 2015 21:53:42 +0000 (-0800) Subject: INFRA-132 - js/angular-crm-util.js - Ignore warning about eval X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f91e4af5644ee92f1a966909ddf689b9f9bd0415;p=civicrm-core.git INFRA-132 - js/angular-crm-util.js - Ignore warning about eval The eval call uses data generated by an implicitly trusted service -- the local JSON encoder. --- diff --git a/js/angular-crm-util.js b/js/angular-crm-util.js index 1ac4ed112a..b889346dcf 100644 --- a/js/angular-crm-util.js +++ b/js/angular-crm-util.js @@ -8,8 +8,12 @@ var deferred = $q.defer(); var p; if (_.isObject(entity)) { + // eval content is locally generated. + /*jshint -W061 */ p = CRM.api3(eval('('+angular.toJson(entity)+')'), message); } else { + // eval content is locally generated. + /*jshint -W061 */ p = CRM.api3(entity, action, eval('('+angular.toJson(params)+')'), message); } // CRM.api3 returns a promise, but the promise doesn't really represent errors as errors, so we