mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
465831175a
Summary: Autolinker is a great open source project but it attempts to parse HTML with regexp, is quite slow, and hangs on specific emails https://github.com/nylas/N1/issues/1540 This is super bad, and also super unnecessary. I think this should do the trick. Note: I changed the urlRegex in our Utils to be much more liberal. It now matches anything that looks like a URL, not just things with the http:// and https:// prefixes. It's used in the LinkEditor and onboarding screen (detecting auth errors with urls) and I think it should be ok? Test Plan: Need to write some tests Reviewers: evan, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D2725
28 lines
983 B
HTML
28 lines
983 B
HTML
|
|
|
|
|
|
<title></title>
|
|
|
|
<a href="
|
|
http://apple.com/" title="
|
|
http://apple.com/">
|
|
http://apple.com/</a>
|
|
<div><br></div>
|
|
<div><a href="https://dropbox.com/" title="https://dropbox.com/">https://dropbox.com/</a></div>
|
|
<div><br></div>
|
|
<div><a href="whatever.com" title="whatever.com">whatever.com</a></div>
|
|
<div><br></div>
|
|
<div><a href="kinda-looks-like-a-link.com" title="kinda-looks-like-a-link.com">kinda-looks-like-a-link.com</a></div>
|
|
<div><br></div>
|
|
<div><a href="ftp://helloworld.com/asd" title="ftp://helloworld.com/asd">ftp://helloworld.com/asd</a></div>
|
|
<div><br></div>
|
|
<div><a href="tel:540-250-2334" title="tel:540-250-2334">540-250-2334</a></div>
|
|
<div><br></div>
|
|
<div><a href="tel:+1-524-123-3333" title="tel:+1-524-123-3333">+1-524-123-3333</a></div>
|
|
<div><br></div>
|
|
<div><a href="550.555.1234" title="550.555.1234">550.555.1234</a></div>
|
|
<div><br></div>
|
|
<div><a href="mailto:bengotow@gmail.com" title="mailto:bengotow@gmail.com">bengotow@gmail.com</a></div>
|
|
<div><br></div>
|
|
|
|
|