3/4/2026 at 2:37:42 AM
>Remove all ASCII tab or newline from input.the title is referring to inside html attributes, where they will be removed hence not affect where the link points.
by bmandale
3/4/2026 at 2:50:27 AM
Yeah "You can use newline or tab characters in the HREF attribute and the browser will throw a validation error, remove the offending character, try again, then succeed" would be a more accurate title.by joshuahaglund
3/4/2026 at 6:30:49 AM
Validation errors aren't really "exceptions" to be thrown, they are indicators for authors that something is probably wrong but they make no visible difference in the output. I'm not sure if any browser even tracks them (and if one did, the best it could do is complain in the dev tools).Also, this is not limited to HREF, it's defined in URL[0] so you can also put newlines in new URL("...") etc.
by shiomiru
3/4/2026 at 2:48:13 PM
[dead]by squeefers
3/4/2026 at 10:15:50 PM
[dead]by ossisjxish
3/4/2026 at 12:32:06 PM
HTML doesn’t remove whitespace from quoted attribute values. XML replaces such things with a single space, but HTML leaves it intact. (If you want actual tabs and newlines in XML or an HTML/XML polyglot—which can be reasonable, seen for example in the HTML title attribute—you have to encode them as 	 and or similar.)So no, this does boil down to the behaviour quoted from the URL Standard.
by chrismorgan
3/4/2026 at 2:48:30 PM
The "professor of Computer Science" seems to be confusing URLs and the textual representation of a URL inside HTML.Considering he wrote on his blog that he "ranks among the top 2% of scientists globally", I'm guessing he's more of a Trumpesque personality, another "very stable genius".
by netsharc
3/5/2026 at 5:25:36 AM
He is a bit full of himself, but if you read some of his other work, he’s done some incredible work making fast code. Lots of SIMD, some novel algorithms, etc.by sgarland
3/4/2026 at 5:26:07 AM
> the title is referring to inside html attributes, where they will be removed hence not affect where the link points.I thought so too, until I read the URL definition in RFC 1738
In some cases, extra whitespace (spaces, linebreaks, tabs, etc.) may need to be added to break long URLs across lines. The whitespace should be ignored when extracting the URL.
No whitespace should be introduced after a hyphen ("-") character. Because some typesetters and printers may (erroneously) introduce a hyphen at the end of line when breaking a line, the interpreter of a URL containing a line break immediately after a hyphen should ignore all unencoded whitespace around the line break, and should be aware that the hyphen may or may not actually be part of the URL.
by locknitpicker
3/4/2026 at 9:17:30 AM
RFC 1738 was superseded by RFC 3986 (URIs) 19 years ago, and the URL Living Standard.by johneth