Mailspring/internal_packages/message-list/spec/autolinker-fixtures/plaintext-out.html
Ben Gotow 465831175a rm(autolinker): Use our own very simple autolinker
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
2016-03-14 12:30:54 -07:00

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>