Discussion
Hummmm do you just remove dots from the end of all urls to display? Sounds.. bad..
A quick search shows that the internet is full of people who disagree on the best way of ending a sentence with a URL.
Here's a regex to exclude the ending period though.
https://stackoverflow.com/questions/55768921/url-regex-that-skips-ending-periods
Can urls end with periods? If you remove one that ends with a period, then it could go wrong.
Apparently browsers treat a period as a redirect. It's weird but valid.
https://stackoverflow.com/questions/7555553/can-period-be-part-of-the-path-part-of-an-url#7555609
https://nostr.com. (we’re using the Fully Qualified Domain Name)
Google has some style suggestions: https://developers.google.com/style/periods#periods-with-urls
Oh nice, great resource
FQDN always has a dot at the end.
I have an even worse suggestion. Prefetch the URL with the period and if that 404s fetch the URL without the period.
I was totally joking on this but in my testing on how Slack handles this edge case there was a brief moment before it excluded the trailing period from the link.
It seems they do some kind of prefetch request to see if the link should include the period.