Should custom validity error message treat \r as newline?
What is the issue with the HTML Standard?
A test snippet can be found at https://jsfiddle.net/naw7qxzf/
Currently Safari treats \r as newline, but Chrome doesn't. Looks like the spec only asks UAs to display this message, so this is left as an undefined behaviour.
I think it should match the title attribute. Per https://software.hixie.ch/utilities/js/live-dom-viewer/?.%3Cscript%3E%0Adocument.body.title%20%3D%20%22Line%5CrLine2%5CnLine3%22%0A%3C%2Fscript%3E it seems that all browsers support \r as newline there.
However, https://html.spec.whatwg.org/#the-title-attribute does not say that. I guess we should fix that?
Further testing shows \r\n is a single newline as well, which is somewhat expected.
That makes sense. alert uses https://infra.spec.whatwg.org/#normalize-newlines, maybe we should reuse it?
Sounds good to me. Want to PR?