Refactor line break normalization in form submission
Categories
(Core :: DOM: Forms, task, P3)
Tracking
()
People
(Reporter: jdai, Unassigned)
References
(Blocks 1 open bug)
Details
According to spec[1], we should do line break normalization while form appending an entry, however, we separate line break normalization in different submit-body[2][3][4], hence, we can consider centralizing the code in one place.
[1] https://html.spec.whatwg.org/#append-an-entry
[2] https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/dom/html/HTMLFormSubmission.cpp#391-393
[3] https://searchfox.org/mozilla-central/rev/26b13464c2beb26e0d864d561c30e817a85c348a/dom/html/HTMLFormSubmission.cpp#684-686
[4] https://searchfox.org/mozilla-central/rev/26b13464c2beb26e0d864d561c30e817a85c348a/dom/html/HTMLFormSubmission.cpp#326-328
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I recently added wpt tests to test for this, among other corner cases in the multipart/form-data
encoding and the behavior of FormData
objects (https://github.com/web-platform-tests/wpt/pull/26556), and the fact that you can construct a FormData
object from a form and read from it means that the newline normalization not happening when appending an entry is web-observable. (https://wpt.fyi/results/html/semantics/forms/form-submission-0/newline-normalization.html?label=master&label=experimental&product=firefox&aligned)
Comment 2•3 years ago
|
||
(In reply to Andreu Botella from comment #1)
I recently added wpt tests to test for this, among other corner cases in the
multipart/form-data
encoding and the behavior ofFormData
objects (https://github.com/web-platform-tests/wpt/pull/26556), and the fact that you can construct aFormData
object from a form and read from it means that the newline normalization not happening when appending an entry is web-observable. (https://wpt.fyi/results/html/semantics/forms/form-submission-0/newline-normalization.html?label=master&label=experimental&product=firefox&aligned)
Whether this is a bug or not is now being reconsidered in the spec: https://github.com/whatwg/html/issues/6469
Description
•