Open mcclure opened 3 days ago
I will take a look at this
This looks like a problem with Atproto. The issue is that Atproto first checks if the link starts with "http" or not (case sensitively). If not, then Atproto will check if the top-level domain (.com, .net, ...) is valid. Unfortunately, the list of top-level domains that Atproto uses is from an npm package called tlds (https://www.npmjs.com/package/tlds). If you look at the code of this package, it lowercases all the top-level domains, so the URLs you mentioned will be considered invalid. https://github.com/bluesky-social/atproto/blob/c34426fc55e8b9f28d9b1d64eab081985d1b47b5/packages/api/src/rich-text/detection.ts#L45-L48
I have created a PR to fix that issue in Atproto here: https://github.com/bluesky-social/atproto/pull/3002
Steps to Reproduce
Go to bsky.social. Make a post and type on various lines:
https://cnn.com
cnn.com
https://cnn.COM
Https://cnn.com
HTTPS://cnn.com
CNN.COM
cnn.Com
OBSERVED BEHAVIOR: 1, 2, and 3 are recognized as URLs and become blue links. 4-7 are not. EXPECTED BEHAVIOR: All of these should be recognized as valid URLs, because they are. The components in which the capital letters occur are not case sensitive:
Attachments
Examples in this thread
https://bsky.app/profile/testaccountgoaway.bsky.social/post/3lavuyyxke22z
What platform(s) does this occur on?
Android, Web (Desktop)
Device Info
Firefox 130.0.1 on Ubuntu Linux, bluesky app on Android 13
What version of the app are you using?
Android app version is 1.93.0
Additional Information
Impact: This is really frustrating on Android because I use the Google "GBoard" keyboard, which likes to capitalize random things without me meaning to.