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

newline symbol correction for fields value before send to server #158

Closed
cgi-caesar opened this issue Dec 16, 2011 · 1 comment
Closed
Labels

Comments

@cgi-caesar
Copy link

I believe last line of function $.fieldValue should looks like:

return $(el).val().replace( /\r?\n/g, "\r\n" );

Otherwise standard submit and ajax submit will result with different newline symbol on server script on linux machine.

Please refer how jQuery serialize form.

Best Regards.

@kevindb
Copy link
Contributor

kevindb commented Feb 24, 2017

https://github.com/jquery/jquery/blob/master/src/serialize.js#L124
It makes sense to match jQuery core's serialization logic.

kevindb pushed a commit that referenced this issue Mar 2, 2017
per the application/x-www-form-urlencoded specification

#158 #421 #516 #517

Follows jQuery's lead:
jquery/jquery@eed3803
5bf81154
@kevindb kevindb closed this as completed Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants