-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate textarea newline normalization #6647
Comments
web-platform-tests/wpt#28798 has some tests for this. @saschanaz perhaps you can run them on Windows? If Firefox doesn't emit CRLF there either I'd be comfortable suggesting a specification change. |
The tests all pass on Windows 👍 |
@mfreed7 this is another subtle change around newline handling in forms. It seems that Firefox/Safari use LF rather than CRLF for https://html.spec.whatwg.org/#textarea-wrapping-transformation. Would you be okay with aligning Chrome with that as well? If so, I can create a PR for HTML. Andreu already wrote tests. |
Thanks for splitting this issue out here. Just so I'm clear, there are three normalization behaviors for
Please let me know if I'm off anywhere above. Given that for the entirety (?) of the rest of form serialization, "normalized" means "normalized to CRLF", is there a particular reason (other than 2/3 engines doing it) to make
Are there good reasons to use LF for |
When it comes to form submission serialization, This is specifically about what should happen for |
I actually took a look at the Chromium code that does the |
(@andreubotella and I further discussed this on IRC and to keep things simple we'd only change CRLF to LF as part of this issue and leave data model cleanup to #6662 as that is a bit more involved due to |
@mfreed7 heya, any new thoughts on this given our feedback above? I'd like to land this change together with the other two changes and then start the effort to get all the implementations aligned and point everyone to the latest tests. |
Hey, sorry for the delay here. And thanks for the clarifications above. With that new understanding (textarea still serializes as CRLF, and only readback from |
I opened a Chromium bug for #6287 back in the day. Should I mention #6624 and this issue in a comment, or should I open a new bug? Gecko and WebKit aren't affected by this issue, but I did open bugs on them for #6624, since we kept the USV conversion even though they didn't implement it. |
Complements whatwg#6287 and whatwg#6624. Fixes whatwg#6647. See also whatwg#6662 for further cleanup on the textarea data model.
That's perfect! Let's keep all of this together in just the one bug. We'll likely end up tackling this as a single project, so it's easier to have one bug.
Thanks! |
As discussed in #6624 not all browsers align with the standard here. If Firefox and Safari indeed do LF normalization on all platforms that might be reasonable to go with instead. Otherwise we should just add a test and file bugs.
(
wrap=hard
not being supported in Firefox is a known bug.)cc @andreubotella
The text was updated successfully, but these errors were encountered: