fix IE upload when Array prototype has been modified

The edittable plugin broke uploading in IE8 (and maybe others) because
the Handsontable script adds a function to the Array prototype and the
uploading script did not properly check that.
This commit is contained in:
Andreas Gohr 2014-06-19 12:01:49 +02:00
parent d96ca44fc9
commit 8c66b72dd4
1 changed files with 3 additions and 1 deletions

View File

@ -226,7 +226,9 @@ qq.obj2url = function(obj, temp, prefixDone){
} else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){
// for anything else but a scalar, we will use for-in-loop
for (var i in obj){
add(obj[i], i);
if(obj.hasOwnProperty(i) && typeof obj[i] != 'function') {
add(obj[i], i);
}
}
} else {
uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));