Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Data with & and ' #3

Open
matthmu opened this issue Nov 19, 2014 · 1 comment
Open

Ajax Data with & and ' #3

matthmu opened this issue Nov 19, 2014 · 1 comment

Comments

@matthmu
Copy link

matthmu commented Nov 19, 2014

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
Copy link
Author

matthmu commented Nov 19, 2014

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, '');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant