User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070617 Minefield/3.0a6pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070617 Minefield/3.0a6pre When submitting a form of a "XHTML page", if the value of a control contains newline characters (13+10) Firefox encodes them with a single space (+). Doesn't happen with html pages. Reproducible: Always Steps to Reproduce: 1. open minimal_form_xhtml.xhtml 2. click "Test" button 3. you get "minimal_form_xhtml.xhtml?a=aaa+bbb" instead of "minimal_form_xhtml.xhtml?a=aaa%0D%0Abbb" Actual Results: newline substituted with "+" Expected Results: should be "%0D%0A" Html mode works as expected. Reproduced with Firefox 2.0.x and Firefox 3 alpha Gecko/20070617 Minefield/3.0a6pre
Created attachment 268814 [details] minimal testcase (xhtml page) XHTML page containing a form with hidden input control with a newline character inside the value.
Created attachment 268815 [details] minimal testcase (html page) HTML page containing a form with hidden input control with a newline character inside the value. This page works as expected.
Component: General → General
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
This seems to be a problem with the form submission. Using the DOM Inspector, I can see that the value attribute is "aaa bbb" as per http://www.w3.org/TR/xhtml1/#h-4.7: "Map sequences of one or more white space characters (including line breaks) to a single inter-word space."
Severity: major → normal
Component: General → HTML: Form Submission
QA Contact: general → form-submission
Converting newline characters in the xhtml file to
I get the expected result. So I simply need to study XHTML a little more, right? Setting it as INVALID? Sorry for time you have lost...
It's still unclear to me why the space is replaced by a "+" and not encoded...
+ is the encoding for spaces in application/x-www-form-urlencoded. See https://url.spec.whatwg.org/#application/x-www-form-urlencoded.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.