Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use JSON.parse() instead of eval()

  • Loading branch information...
commit ae8e03c2f29423168c16e1f9d32b18e9321c0bd7 1 parent 4bda181
@jgoguen authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 client/fileuploader.js
View
4 client/fileuploader.js
@@ -1156,7 +1156,7 @@ qq.extend(qq.UploadHandlerForm.prototype, {
json = doc.body.innerHTML.match(/^\s*(<(\w+)>)?(.*?)(<\/\2>)?\s*$/)[3];
try {
- response = eval("(" + json + ")");
+ response = JSON.parse("(" + json + ")");
} catch(err){
response = {};
}
@@ -1339,7 +1339,7 @@ qq.extend(qq.UploadHandlerXhr.prototype, {
var response;
try {
- response = eval("(" + xhr.responseText + ")");
+ response = JSON.parse("(" + xhr.responseText + ")");
} catch(err){
response = {};
}

0 comments on commit ae8e03c

Please sign in to comment.
Something went wrong with that request. Please try again.