newline (13+10) submitted as space (+) in XHTML mode

RESOLVED INVALID

Status

()

RESOLVED INVALID
12 years ago
a year ago

People

(Reporter: scoda, Unassigned)

Tracking

({testcase})

Trunk
x86
Linux
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
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
(Reporter)

Comment 1

12 years ago
Created attachment 268814 [details]
minimal testcase (xhtml page)

XHTML page containing a form with hidden input control with a newline character inside the value.
(Reporter)

Comment 2

12 years ago
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.

Updated

12 years ago
Component: General → General
Keywords: testcase
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk

Comment 3

12 years ago
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
(Reporter)

Comment 4

12 years ago
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...

Comment 5

12 years ago
It's still unclear to me why the space is replaced by a "+" and not encoded...

Comment 6

a year ago
+ 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.