Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some links do not show correctly in messages #13731

Closed
wreiske opened this issue Mar 15, 2019 · 9 comments · Fixed by #21515
Closed

Some links do not show correctly in messages #13731

wreiske opened this issue Mar 15, 2019 · 9 comments · Fixed by #21515

Comments

@wreiske
Copy link
Contributor

wreiske commented Mar 15, 2019

Description:

Steps to reproduce:

  1. Copy the following URL into your clipboard.
https://www.amazon.com/2019-Current-Procedural-Terminology-Professional/dp/1622027523/ref=pd_sim_14_2/141-4083928-5368111?_encoding=UTF8&pd_rd_i=1622027523&pd_rd_r=f2563917-4730-11e9-9fed-6f308a1afb98&pd_rd_w=YFSK0&pd_rd_wg=BTxdT&pf_rd_p=90485860-83e9-4fd9-b838-b28a9b7fda30&pf_rd_r=8F6FS9NHT1Z61S6Z1DFQ&psc=1&refRID=8F6FS9NHT1Z61S6Z1DFQ2563917-4730-11e9-9fed-6f308a1afb98&pd_rd_w=YFSK0&pd_rd_wg=BTxdT&pf_rd_p=90485860-83e9-4fd9-b838-b28a9b7fda30&pf_rd_r=8F6FS9NHT1Z61S6Z1DFQ&psc=1&refRID=8F6FS9NHT1Z61S6Z1DFQ2563917-4730-11e9-9fed-6f308a1afb98&pd_rd_w=YFSK0&pd_rd_wg=BTxdT&pf_rd_p=90485860-83e9-4fd9-b838-b28a9b7fda30&pf_rd_r=8F6FS9NHT1Z61S6Z1DFQ&psc=1&refRID=8F6FS9NHT1Z61S6Z1DFQ&tag=apis03-20
  1. Paste into Rocket.Chat message
  2. Send it

Expected behavior:

Show the link correctly.

Actual behavior:

58jhaQ6ide

Server Setup Information:

  • Version of Rocket.Chat Server: Open.Rocket.Chat (latest develop branch?) 0665caa
@fliptrail
Copy link
Contributor

Probably, this is caused due to a limit in the URL length.

@Kailash0311
Copy link
Contributor

No this can't be due to limit of the URL length, because links work correctly, only thing is that color of the text is not blue for the whole URL and it is not recognized as clickable for half of the part of the URL.

@Kailash0311
Copy link
Contributor

Are you working on this? @fliptrail

@Kailash0311
Copy link
Contributor

Kailash0311 commented Mar 20, 2019

so as RC uses autolinker (npm module) for linking its messages within anchor tag, there exists a bug where it stops recognizing the URL for some reason. so I think if we have to resolve this issue, we have to write our own package, which can be cumbersome and really not needed as this seems like an edge-case.

@wreiske
Copy link
Contributor Author

wreiske commented Mar 20, 2019

so as RC uses autolinker (npm module) for linking its messages within anchor tag, there exists a bug where it stops recognizing the URL for some reason. so I think if we have to resolve this issue, we have to write our own package, which can be cumbersome and really not needed as this seems like an edge-case.

Edge case? This happens for me all the time in my day-to-day sending links around. If rocket.chat can't format an amazon link correctly, that's a pretty valid issue.

@wreiske
Copy link
Contributor Author

wreiske commented Mar 20, 2019

Rocket.Chat uses "autolinker": "^1.8.1"... There was a recent push 3 days ago bringing the latest autolinker to 3.0.5.

I'll try upgrading autolinker and see if the problem is resolved later tonight.

@Kailash0311
Copy link
Contributor

Kailash0311 commented Mar 20, 2019

so as RC uses autolinker (npm module) for linking its messages within anchor tag, there exists a bug where it stops recognizing the URL for some reason. so I think if we have to resolve this issue, we have to write our own package, which can be cumbersome and really not needed as this seems like an edge-case.

Edge case? This happens for me all the time in my day-to-day sending links around. If rocket.chat can't format an amazon link correctly, that's a pretty valid issue.

Sorry I didn't know it was a common issue.

@wreiske
Copy link
Contributor Author

wreiske commented Mar 20, 2019

Another note: For really long links, we might want to limit the text and append an ellipsis (...) to the end of it. You would still be able to click it, right click copy link, etc., and it would look cleaner than a giant block of text as a link.

@wreiske
Copy link
Contributor Author

wreiske commented Mar 22, 2019

The issue is with autolinker. I opened a ticket there. I'll keep this issue open since it will require an update of the autolinker npm once it is available.

Also.. this issue goes away if you disable phone auto linking.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants