Multiple_file_drag_and_drop_upload icon indicating copy to clipboard operation
Multiple_file_drag_and_drop_upload copied to clipboard

Ajax Data with & and '

Open matthmu opened this issue 10 years ago • 1 comments

Hey there! Thanks for this easy multiupload script, its very fine and simple.

But I have a big problem with my AJAX data: Is the name of an image like " My & Name.jpg " or " My 'Name' " the upload doesn't work. I tried to resolve that problem, but I have no resolution.

Another question is: Why I can't use contentType in $ajax.();?

matthmu avatar Nov 19 '14 15:11 matthmu

Okay, I solve this problem. Just replace this function:

Before:

String.prototype._unique = function(){ return this.replace(/[a-zA-Z]/g, function(c){ return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26); }); }

After:

String.prototype.unique = function(){ return this.replace(/[^a-zA-Z0-9.äöüÄÖÜ]/g, ''); }

matthmu avatar Nov 19 '14 19:11 matthmu