Closed Bug 182474 Opened 23 years ago Closed 22 years ago

When submittng a form mozilla replaces \n by \r\n in form parameters, this preventing submission of binary data

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 92728

People

(Reporter: mal, Assigned: alexsavulov)

References

()

Details

(Keywords: dataloss, Whiteboard: DUPEME?)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 mozilla-1.0.1-2.7.3 RedHat 7.3 Mozilla on Linux mozilla-1.0.1-2.7.3 (RedHat 7.3) when submitting a form replaces \n by \r\n, This no binary data can be submitted. Reproducible: Always Steps to Reproduce: Try this and click "submit" <HTML> <BODY BGCOLOR="#ffffff"> <FORM METHOD="get" ACTION="/"> <INPUT TYPE="hidden" NAME="dump" VALUE="--ABC--&#10;--CDE--&#10;--XYZ--&#10;END"> <INPUT TYPE="submit" VALUE="SUBMIT"> </FORM> </BODY> </HTML> Actual Results: You get this URL. The %0D (\r) was added. file:///?dump=--ABC--%0D%0A--CDE--%0D%0A--XYZ--%0D%0AEND Expected Results: Mozilla on Linux should not replace \n by \r\n As it is now no binary data can be put in form parameter. Netscape, for example, produces this URL: file:/?dump=--ABC--%0A--CDE--%0A--XYZ--%0AEND/ (no \r (%0D) added) Some data just gets submitted incorrectly, what causes data loss. This is why I marked this bug as critical.
This is a test case is attached for convinience.
this one sounds like a duplicate. hmm. checking.
Whiteboard: DUPEME?
In HTML 4.01 spec (http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1) it clearly says "Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A')." I am pretty sure this is invalid
What you have in a form is not "line breaks". This is data. Line breaks occur when user physically clicked "Enter" (or equivalent). Once the data is in the form - this is just data.
related to bug 92728?
*** This bug has been marked as a duplicate of 92728 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: