Autolinking doesn't work for TLDs longer than 4 characters
Original report: https://github.com/mattermost/mattermost-server/issues/17025
The Markdown autolinking only works for TLDs up to 4 characters.
Even though there are many new TLDs with more than 4 characters, e.g. .africa, .computer, etc.
In fact TLDs can be as long as 63 characters.
Steps to reproduce
Repros on v5.31 and v5.32 at least.
Send a message with (see the Github issue for the correct formatting):
Both links are autolinked.
Only the first link is autolinked since the TLD of the second link has more than 4 characters.
Increase the autolink TLD limit to 63 characters or alternatively check the TLD against a list of all TLDs.