Side navigation
#6876 closed bug (fixed)
Opened August 05, 2010 05:31PM UTC
Closed December 31, 2010 08:03PM UTC
Last modified November 20, 2013 05:08PM UTC
Newline in form data should be encoded as CRLF pair
Reported by: | dmethvin | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | ajax | Version: | 1.4.2 |
Keywords: | form,newline,crlf,pair,ajaxrewrite | Cc: | |
Blocked by: | Blocking: |
Description
See this post:
Summary: The .value property of a textarea returns only LF between lines on all browsers but IE/Opera, but the W3C says lines should be delimited by CRLF when the form is submitted.
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
Attachments (0)
Change History (7)
Changed August 06, 2010 12:30AM UTC by comment:1
Changed October 21, 2010 02:18AM UTC by comment:2
keywords: | form → form newline crlf pair |
---|---|
milestone: | 1.4.3 → 1.5 |
priority: | → undecided |
status: | new → open |
Marking for review and possible inclusion in 1.5.
Changed December 27, 2010 10:37PM UTC by comment:3
keywords: | form newline crlf pair → form,newline,crlf,pair,ajaxrewrite |
---|
Changed December 31, 2010 01:02AM UTC by comment:4
owner: | → dmethvin |
---|---|
status: | open → assigned |
Changed December 31, 2010 08:03PM UTC by comment:5
resolution: | → fixed |
---|---|
status: | assigned → closed |
When serializing text, encode all line breaks as CRLF pairs per the application/x-www-form-urlencoded specification. Fixes #6876.
Changeset: eed3803c98bf5c074e40aad12f2e91435bf81154
Changed January 31, 2011 04:26PM UTC by comment:6
priority: | undecided → low |
---|
As I read the spec, it seems like *all* line breaks of LF should be replaced with CRLF, which makes the fix easier than special-casing a textarea.
Looks like this could be fixed in serializeArray:
(In two places...)
Another possibility would be to fix it in .val(), which is currently normalizing line endings by removing the CR in browsers where it's present -- IE and Opera. I like that fix better in some ways but am concerned that it will break too much existing code that expects a lone LF.