Thank you for reporting this bug. We will make it our priority to review this report.
-
Ext User
[FIXED][3.0] Eval usage
I'm wondering why do you still (in version 3) use the eval function is several parts of the code instead of using always the same function to parse JSON.
For example in the JSONReader:
Code:
readResponse : function(response) {
var json = response.responseText;
var o = eval("("+json+")");
if(!o) {
throw {message: "JsonReader.read: Json object not found"};
}
return o;
}
Why don't you just use:
Code:
var o = Ext.decode("("+json+")");
-
Yeah, when I mentioned it before I forgot to mention readResponse as well as read...
-
Mostly just an oversight, it doesn't really affect much, but it would be nice to fix up.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
Ext User

Originally Posted by
stever
I missed your thread, but I just give that as an example.
If you search for eval in ext-all-debug.js it's used in much more places and if the Ext.decode already takes in account the browser support for JSON, should be used everywhere.

Originally Posted by
evant
Mostly just an oversight, it doesn't really affect much, but it would be nice to fix up.
Agree.
-
In a lot of places we still need to use eval(), the only outstanding place where it should use decode() is in the JsonReader, which I've just committed.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.