Before this change, newlines in form entries were normalized early in the form submission process (during the entry list construction), with an additional late normalization happening as the form payload was encoded with the application/x-www-form-urlencoded enctype. With this change, the early normalization is removed and the late normalization is extended to all enctypes.
While this is a change in behavior, it should only affect very corner case situations. And the fact that both WebKit and Gecko have shipped this behavior should also mitigate the compat risk. For more detail, see the discussions on the spec PR: https://github.com/whatwg/html/pull/6287 This is an interop-related change: prior to this feature launching in Chromium, the browsers differed on behavior. They will now be the same.
No DevTools support required. This feature can be debugged directly via Javascript.
No milestones specified
LGTM1
If I understand correctly, this change would only be visible if someone programmatically creates form data in javascript with the FormData constructor, that data has non-CRLF newlines and the page in one way or another depend on the interim value having been normalized inside the FormData object before submit. I agree that this is an obscure case and the presence of other browsers with different behaviour makes this ok to ship.
/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDhaRnX8dvv-UoR%2BmxZ0ksshLy0SGbx5Krk4wguf1B_r6A%40mail.gmail.com.
Thanks for the clarification! My LGTM1 stands.
/Daniel
Just to clarify: inspecting a FormData object isn't the only way to observe this change. If you call fetch() with a FormData body, have a form-associated custom element whose submission value is a FormData, or modify a form's entry list through the FormData object passed in the formdata event, before this change you could end up with unnormalized entries in the form payloads, since early normalization doesn't apply and the FormData methods don't normalize entries. Since late normalization happens at the point of encoding the form payload as the corresponding enctype, those cases will now be normalized. It's still an extremely obscure case, though.
Andreu
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/4599b155-8ebc-715c-ea76-5023dd7fe86f%40igalia.com.