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

Short URL not recognized and converted to emoji

Open grthr opened this issue 2 years ago • 2 comments

Description: When pasting an short URL like https://g.co/meet/something, it is not rendered as Link and not clickable. Even using it inside Markdown Link style does not work.

image

Steps to reproduce: Type https://g.co/meet/something in the message input Expected behavior: A link should be created to the given URL

Actual behavior: An emoji is rendered from the :/ and no link is created.

Server Setup Information: Version of Rocket.Chat Server: 5.0.1 Deployment Method: docker Number of Running Instances: 1 MongoDB Version: 4.2 Client Setup Information Desktop App or Browser Version: Electron / Web (Chrome) Operating System: Windows

grthr avatar Aug 04 '22 15:08 grthr

This was working fine in 4.8.1

grthr avatar Aug 04 '22 15:08 grthr

Facing the same issue, it's quite annoying.

Akkowicz avatar Aug 08 '22 13:08 Akkowicz

Super annoying. We had to downgrade the server to an older version because we could not send file paths anymore without them getting destroyed by emojis.

fuchsundvogel avatar Aug 12 '22 11:08 fuchsundvogel

Just found out that the behavior is different in Threads. There it works as expected. Maybe this helps finding the cause of the issue.

grthr avatar Aug 12 '22 14:08 grthr

Bildschirmfoto 2022-08-15 um 09 14 50

Same issue with "10:30" > 0:3 get's translated into an emoji.

saschafoerster avatar Aug 15 '22 07:08 saschafoerster

hi :) We just updated to the latest version, and sure thing short url aren't translated to URL. Our autolinker regex parser is the default (://|www\.).+ so nothing there... It look like it only fail for 1 letter subdomain ? I have a https://s.companyname.org for short link for example, don't work same for www.s.companyname.org but https://s1.companyname.org do work what is even weirder is that something like www.word.a.domain.com will link like this www.word.a.domain.com

Somewhere, there is something that break for single char in url...

:+1: is also broken, no longer returning a :+1: but :+1: i wonder if we shouldn't just change the markdown engine ...

Vaarlion avatar Aug 17 '22 11:08 Vaarlion

So, in Settings, Account, Default User Preferences, you have a global switch to revert to the old message template. image

You can also do this for your user only in My account, Preferences , Global

It does not fix this bug, but allow to work around it until the dev have the time to do so

Vaarlion avatar Aug 22 '22 12:08 Vaarlion

Same problem for me with url which doesn't have .com or dot something... image

kekefreedog avatar Aug 22 '22 15:08 kekefreedog

Fixed by: https://github.com/RocketChat/fuselage/pull/800/files

hugocostadev avatar Sep 13 '22 16:09 hugocostadev