5 ms·
Among the ways in which the early web may have been an improvement upon its successors: https://www.w3.org/Addressing/URL/5.1_Wrappers.html https://www.w3.org/A
by 082349872349872 6y ago
Among the ways in which the early web may have been an improvement upon its successors:
https://www.w3.org/Addressing/URL/5.1_Wrappers.html https://www.w3.org/Addressing/URL/5.1_Wrappers.html
- thaumasiotes 6y agoI always delimit URLs with spaces. For example, I might punctuate your comment this way: > Among the ways in which the early web may have been an improvement upon its successors: https://www.w3.org/Addressing/URL/5.1_Wrappers.html https://www.w3.org/Addressing/URL/5.1_Wrappers.html . It's surprising to me that nobody else does this.
- edent 6y agoI think that's the sensible way to do it.
- jfk13 6y agoThat can result in unfortunate line breaks.
- thaumasiotes 6y agoSo? It can't lead to malformed URLs. Perhaps the Virgin marketing team could go the distance to send U+200C between the end of the URL and the punctuation following it, but I'm not going to.
- Dylan16807 6y agoKeep in mind that SMS is either 160 7-bit characters or 70 16-bit characters. It wouldn't fit.
- jwilk 6y agoU+200C is ZERO WIDTH NON-JOINER, which doesn't make sense in this context. Did you mean U+200B ZERO WIDTH SPACE?
- andreareina 6y agoI do, and I wouldn't be surprised if more people here do so as well. Then again, I also wouldn't be surprised at people here not doing so and expecting URL classifier to strip trailing punctuation even though the spec allows it.
- JadeNB 6y agoI also do it, because sometimes the parser does the 'right' think and sometimes it doesn't, and it's easier just never to rely on it. It's tough to fight when the parser thinks it's doing the right thing but isn't; for example, I literally couldn't find out how to send someone a link to https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_Us https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_U...! in Slack; the trailing ! is part of the URL, but Slack resolutely refused to recognise at such. (I don't know what HN's parser does, so I guess we can regard this as an experiment! EDIT: HN also refuses to recognise it. I tried the <> wrapper suggested elsethread, with amusing results: it makes HN's parser gobble both the ! and the trailing > as part of the URL! Maybe a percent-encoding would have been the way to go.)
- deleted 6y ago[deleted]
- bmn__ 6y ago> I literally couldn't find out how to send someone a link The usual work-around is to encode the offending character(s). In this example, `!` becomes `%21`. https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_Us%21 https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_U... > HN also refuses to recognise it. The HN software is RFC ignorant. Could you please send an email to the Web master so the bug can get fixed?
- JadeNB 6y ago> The usual work-around is to encode the offending character(s). In this example, `!` becomes `%21`. Yeah, that was my speculation: > > Maybe a percent-encoding would have been the way to go. > The HN software is RFC ignorant. Could you please send an email to the Web master so the bug can get fixed? I try to be conscientious in general about reporting bugs I find in software, but arguing about the details of Markdown parsers is an endless full-time job with no reward. Of course you are welcome to do it if you think it's worth the time.
- bmn__ 6y agoThis has been standardised in: https://tools.ietf.org/html/rfc3986#appendix-C https://tools.ietf.org/html/rfc3986#appendix-C So double quotes, angle brackets or whitespace are conforming/acceptable separators. I have known about this RFC for a long time and hence I have been practically applying it in the wild. Most software deals with the standard separators correctly, and the problem of unwanted trailing punctuation is mitigated.