Rocket.Chat
Rocket.Chat copied to clipboard
Links to a third-level domain with a dash are not active
Description:
In the new message template, links do not become clickable if there is a third-level domain in the address, while a dash is present in the second-level domain.
Steps to reproduce:
- Send to chat link http://test.e-xample.com
- The link does not become active.
Expected behavior:
Links with dashes are converted to clickable links.
Actual behavior:
Links to a third-level domain with a dash are not converted to active.
Server Setup Information:
- Version of Rocket.Chat Server: 5.3.3
- Operating System: Oracle Linux 8.5
- Deployment Method: docker
- Number of Running Instances: 20
- DB Replicaset Oplog: Enabled
- NodeJS Version: v14.19.3
- MongoDB Version: 5.0.14
Client Setup Information
- Desktop App or Browser Version: Desktop App 3.8.11
- Operating System: Windows 10
I can confirm what's been said, on Rocket Chat 5.3.3. However, I'd like to add that https://test.ex-ample.com
works fine.
Related issue: https://github.com/RocketChat/Rocket.Chat/issues/27078
Seems like links with a 2nd level domain starting with a number are also affected:
-
[Test Link](https://www.1forall.com)
is not rendered correctly -
[Test Link2](https://www.one-forall.com)
is rendered as a link
Also on 5.3.3. Possibly worth noting this happens even if you try to use markdown to get around it (includes "edit mode" of last link to show markdown)

Also, this is specific to the new message parser. It renders correctly with the legacy if I switch to the message template:

Cause of bug is an external lib @rocket.chat/message-parser that is responsible for detecting links in messages and the changes needed to resolve this need to be made on some other different repo here
Have the same issue in RocketChat 5.4.1. Links like test.1test.com
and test.t-est.com
aren't clickable in a chat message.
Hi, @shevchukma I'm working on this issue! Thanks for reporting!