RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.27k stars 10.44k forks source link

markdown and moldavia collide #4082

Closed sinteur closed 5 years ago

sinteur commented 8 years ago

Your Rocket.Chat version: 0.37.1

When you type "README.md" in a chat window, the auto-linker turns it into an url.

I suspect this is because .md is a TLD , of Moldava Republic, and as a result it ends up with the same bad link generation as e.g. my.lu

readme.md does exist as a real domain name, and it ends up with an unexpected destination

dot-m-d files ARE a file type well known to github users - markdown.

I think it's a BAD idea to turn protocol-less phrases into urls, since there's a pletora of weird domain extensions these days.

geekgonecrazy commented 8 years ago

I don't think we're even checking against a list of valid tld's. But in this case... it is valid. So yeah I see the problem.

If we ignore domains with out a protocol... that would probably be the easiest solution.. I personally haven't found it making those links all that useful. But i'm usually pretty meticulous and make sure I put http(s):// if I intend for it to be a link

I don't think everyone is like this.... Maybe we need this as a user preference?

marceloschmidt commented 5 years ago

We have autolinker settings now that you can turn on/off checking for http(s) in links. Thanks.