Commit graph

10 commits

Author SHA1 Message Date
Ben Gotow
8944e10ae9 fix(autolinker): Don't match emails that are also URLs #2071 2016-04-26 19:03:43 -07:00
Ben Gotow
c5a77fa854 fix(autolinker): Use getAttribute('href') because href is magic 2016-04-26 17:01:15 -07:00
Ben Gotow
0bd7480338 fix(autolinker): Additional test case from #1863 2016-04-06 14:29:28 -07:00
Ben Gotow
a05daeb0f0 fix(autolinker): Add test cases, .ly, url hash chars 2016-04-06 14:17:10 -07:00
Ben Gotow
9a588dbda6 fix(autolinker): Update regexp to handle reported failure cases 2016-03-31 16:36:23 -07:00
Ben Gotow
c1b3f87d71 fix(autolinker): Don't include trailing ? or . in URLs 2016-03-24 16:35:11 -07:00
Ben Gotow
27000e1965 fix(autolinker): Only match top ten tld's when schme not present 2016-03-24 10:14:47 -07:00
Ben Gotow
da47fd4bdb fix(autolinker): Additional phone number parsing specs 2016-03-15 11:04:00 -07:00
Ben Gotow
73afdbb482 fix(autolinker): Add more test cases, improv URL regex 2016-03-15 10:47:14 -07:00
Ben Gotow
c76582194a 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