we are using the jQgrid, however, we are ready to use the paid version, but it is not resolving the content security policy. Please suggest what we need to do.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
parse : function(jsonString) { var js = jsonString; if (js.substr(0,9) === "while(1);") { js = js.substr(9); } if (js.substr(0,2) === "/*") { js = js.substr(2,js.length-4); } if(!js) { js = "{}"; } return ($.jgrid.useJSON===true ? typeof JSON === 'object' : typeof JSON.parse === 'function') ? JSON.parse(js) :eval('(' + js + ')'); } |
==================
1 2 3 4 5 6 7 8 9 10 11 12 13 |
runCode: function (obj) { return Function('"use strict";return (' + obj + ')')(); }, parse : function(jsonString) { var js = jsonString; if (js.substr(0,9) === "while(1);") { js = js.substr(9); } if (js.substr(0,2) === "/*") { js = js.substr(2,js.length-4); } if(!js) { js = "{}"; } return ($.jgrid.useJSON===true && typeof JSON === 'object' && typeof JSON.parse === 'function') ? JSON.parse(js) : $.jgrid.runCode( js ); //eval('(' + js + ')'); }, |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top