FSN#37309 Meer JSON.parse in plaats van eval
svn path=/Website/branches/v2016.1/; revision=30171
This commit is contained in:
@@ -37,7 +37,7 @@ function prettyJson(j)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var xx = JSON.stringify(eval("(" + j + ")"), null, 2);
|
var xx = JSON.stringify(JSON.parse(j), null, 2);
|
||||||
if (xx == "null")
|
if (xx == "null")
|
||||||
return "";
|
return "";
|
||||||
return xx;
|
return xx;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ if (viewoptions)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
viewoptions = JSON.stringify(eval("(" + viewoptions + ")")); // test en formatteer plat
|
viewoptions = JSON.stringify(JSON.parse(viewoptions)); // test en formatteer plat
|
||||||
if (viewoptions == "null")
|
if (viewoptions == "null")
|
||||||
viewoptions = "";
|
viewoptions = "";
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ if (viewjson)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
viewjson = JSON.stringify(eval("(" + viewjson + ")")); // test en formatteer plat
|
viewjson = JSON.stringify(JSON.parse(viewjson)); // test en formatteer plat
|
||||||
if (viewjson == "null")
|
if (viewjson == "null")
|
||||||
viewjson = "";
|
viewjson = "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function prettyJson(j)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var xx = JSON.stringify(eval("(" + j + ")"), null, 2);
|
var xx = JSON.stringify(JSON.parse(j), null, 2);
|
||||||
if (xx == "null")
|
if (xx == "null")
|
||||||
return "";
|
return "";
|
||||||
return xx;
|
return xx;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function prettyJson(j)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var xx = JSON.stringify(eval("("+j + ")"), null, 2);
|
var xx = JSON.stringify(JSON.parse(j), null, 2);
|
||||||
if (xx == "null")
|
if (xx == "null")
|
||||||
return "";
|
return "";
|
||||||
return xx;
|
return xx;
|
||||||
@@ -122,7 +122,7 @@ canChange = (!isProtected ||
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
vtype = JSON.stringify(eval("(" + vtype + ")")); // test en formatteer plat
|
vtype = JSON.stringify(JSON.parse(vtype)); // test en formatteer plat
|
||||||
if (vtype == "null")
|
if (vtype == "null")
|
||||||
vtype = "";
|
vtype = "";
|
||||||
$("#pvalue").val(vtype); // zet de platte tekst terug in de database
|
$("#pvalue").val(vtype); // zet de platte tekst terug in de database
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ function prettyJson(j)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var xx = JSON.stringify(eval("("+j + ")"), null, 2);
|
var xx = JSON.stringify(JSON.parse(j), null, 2);
|
||||||
if (xx == "null")
|
if (xx == "null")
|
||||||
return "";
|
return "";
|
||||||
return xx;
|
return xx;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ function prettyJson(j)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var xx = JSON.stringify(eval("("+j + ")"), null, String.fromCharCode(160, 160, 160, 160));
|
var xx = JSON.stringify(JSON.parse(j), null, String.fromCharCode(160, 160, 160, 160));
|
||||||
if (xx == "null")
|
if (xx == "null")
|
||||||
return "";
|
return "";
|
||||||
return xx;
|
return xx;
|
||||||
|
|||||||
Reference in New Issue
Block a user