Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Links to a third-level domain with a dash are not active

Open shevchukma opened this issue 2 years ago • 6 comments

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:

  1. Send to chat link http://test.e-xample.com
  2. 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. image

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

shevchukma avatar Nov 28 '22 08:11 shevchukma

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.

matthias4217 avatar Nov 28 '22 09:11 matthias4217

Related issue: https://github.com/RocketChat/Rocket.Chat/issues/27078

dudanogueira avatar Nov 28 '22 20:11 dudanogueira

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

david-m-m avatar Nov 30 '22 08:11 david-m-m

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)

image

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

image

ebyrne242 avatar Dec 13 '22 23:12 ebyrne242

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

frankMagoba avatar Dec 22 '22 05:12 frankMagoba

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.

grape9292 avatar Dec 23 '22 15:12 grape9292

Hi, @shevchukma I'm working on this issue! Thanks for reporting!

hugocostadev avatar Jan 23 '23 18:01 hugocostadev