Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

The links in the message are not clickable. #176

Open
lutek opened this issue Nov 20, 2017 · 14 comments
Open

The links in the message are not clickable. #176

lutek opened this issue Nov 20, 2017 · 14 comments

Comments

@lutek
Copy link

lutek commented Nov 20, 2017

The links in the message are not clickable. It is very comfortable instead of copying

@mikeseese
Copy link
Contributor

I can click URLs and they go to the desired location; can you please elaborate and maybe take screenshots/videos of what you mean?

@lutek
Copy link
Author

lutek commented Nov 20, 2017

i mean links written plain text

screenshot from 2017-11-20 17 02 33

@lamixer
Copy link

lamixer commented Nov 20, 2017 via email

@mikeseese
Copy link
Contributor

mikeseese commented Nov 20, 2017

What version do you have? You can can check in the triple dot menu in the top right. Could also be the URL parsing now only has a list of TLDs instead of a catch all. Not sure if we have the .pl TLD in that list; and if we did, it may be difficult to distinguish a domain name with a file name (.pl is a perl script file extension as well)

@lutek
Copy link
Author

lutek commented Nov 20, 2017

Lamixer, yes we can say that's not link by definition but reality is different.
Gmail online is dealing with such links. Will be great have the same functionality inside the client.

Seesenuichaelj, latest v2.2.2 (linux version, my os is Elementary OS, based on Ubuntu 16.04)

@mikeseese
Copy link
Contributor

We actually don't look for http:// in the url parsing. I'm fairly certain this is due to the .pl TLD not being in the list of domains. I would expect your .com URLs being parsed and hyperlinked properly

@lutek
Copy link
Author

lutek commented Nov 20, 2017

Ok, that could be a reason. Maybe using this list for TLD domain will be solution:
https://www.icann.org/resources/pages/tlds-2012-02-25-en

@mikeseese
Copy link
Contributor

Ya, the problem is that we used to get anything that looked like a URL, but this would create hyperlinks if someone referenced a file name (i.e. hello.txt would be hyperlinked), so @nirmit changed it to only create hyperlinks for a certain list of TLDs:

commonTlds = ['com', 'org', 'edu', 'gov', 'uk', 'net', 'ca', 'de', 'jp', 'fr', 'au', 'us', 'ru', 'ch', 'it', 'nl', 'se', 'no', 'es', 'mil', 'ly', 'biz', 'ai', 'info', 'it', 'to', 'io', 'co', 'eu', 'aero', 'jobs', 'mobi', 'at', 'be', 'br', 'cn' ]

This is why the .pl domain is not hyperlinked. Unfortunately, .pl is also a file extension. We will need a path forward on how to deal with whether or not it's a file. Would people be against pinging the name to see if it's actually a website? Seems a bit overkill to ping everytime there's a URL

@lutek
Copy link
Author

lutek commented Nov 20, 2017

It seems to me that more links are sent than paths to files, from a usability perspective it is better to show a false link than its lack. Nylas mail I use for a few days and the lack of links is from my perspective an element to go back to gmail online.

@mikeseese
Copy link
Contributor

@dweremeichik @simonft what do you think? I agree not having the hyperlink is pretty bad, and I'm fine with erroneous links if the TLD is also a file extension. Would be nice to know that "/path/to/file.pl" is not a link but "file.pl" can be a link

i think we should use the icann tld list too

@nirmit
Copy link
Contributor

nirmit commented Nov 20, 2017

@seesemichaelj I think ping would be an overkill and would delay the render. If we all agree, we can bring in the catch-all but that would give us a certain percent failure! let me know and I can add the catch-all to the regex.

@simonft
Copy link

simonft commented Nov 20, 2017

Pinging the name to see if it's a website would be a pretty big privacy leak, similar to (though not as bad as) https://www.bleepingcomputer.com/news/security/iterm2-leaks-everything-you-hover-in-your-terminal-via-dns-requests/

Why not use a library that does this? Link detection rules are very hard (think about urls with port numbers, ip addresses), it seems like it would make sense to use someone from someone who has spent time thinking about this a lot already.

Two options:
https://alexcorvi.github.io/anchorme.js/
http://soapbox.github.io/linkifyjs/

@dweremeichik
Copy link
Member

@seesemichaelj I think that file links should work. Think office environment where someone sends you a link to network resources. If it's a valid link, it is a valid link. Not our problem if the link actually works or not. I checked out the options that @simonft linked. I think https://alexcorvi.github.io/anchorme.js/ looks like the best option.

@mikeseese
Copy link
Contributor

I like the idea of using a library. anchorme.js looks good

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

No branches or pull requests

6 participants