Closed Bug 1518162 Opened 6 years ago Closed 1 year ago

Input element of type email with multiple does not strip leading or trailing whitespaces from email-list elements

Categories

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

Firefox 113
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox64 --- affected
firefox65 --- affected
firefox66 --- affected

People

(Reporter: micge, Unassigned)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15

Steps to reproduce:

In a html form an input element of type email with multiple is used to collect a comma separated list of email-addresses. After each separating comma, a whitespace is inserted, so the list is separated by ", ". This is then submitted via post.

Example: <input type="email" multiple="multiple" name="emaillist" value="test@test.de, test@test.com">

The php file used to reproduce the error is attached.


Actual results:

The string contained in $_POST['emaillist'] is "test@test.de, test@test.com".


Expected results:

The string contained in $_POST['emaillist'] should have been "test@test.de,test@test.com".

According to https://www.w3.org/TR/html5/sec-forms.html#email-state-typeemail and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#Value leading or trailing whitespaces of the elements of the list should be striped, so the result passed on be the form should be a string containing the email-addresses separated by a comma, but no separating whitespaces. Chrome and Safari do this correctly, but Firefox does not.
OS: Unspecified → iOS 10

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Build ID: 20190103134103
I manage to reproduce this on Windows 10 x64 with the latest Firefox release version 64.0.2(64-bit).

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
OS: iOS 10 → All
Product: Firefox → Core
Hardware: Unspecified → All
Component: Layout: Form Controls → DOM: Core & HTML
Priority: -- → P3
Version: 64 Branch → Firefox 100
See Also: → 623538
Summary: Input element of type email with multiple does not strip leading whitespaces from email-list elements → Input element of type email with multiple does not strip leading or trailing whitespaces from email-list elements
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
Version: Firefox 100 → Firefox 113
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: