-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I've encountered a case where a URL has been mistyped, and Linkify doesn't cope very well.
Using www.foo@bar.com:
| Calling | Returns |
|---|---|
processEmails() |
<a href="mailto:www.foo@bar.com">www.foo@bar.com</a> |
processUrls() |
<a href="http://www.foo@bar.com">www.foo@bar.com</a> |
process() |
<a href="http://<a href="mailto:www.foo@bar.com">www.foo@bar.com</a>"><a href="mailto:www.foo@bar.com">www.foo@bar.com</a></a> |
In my real-world example, however, there's a path. Using www.foo@bar.com/baz:
| Calling | Returns |
|---|---|
processEmails() |
<a href="mailto:www.foo@bar.com">www.foo@bar.com</a>/baz |
processUrls() |
<a href="http://www.foo@bar.com/baz">www.foo@bar.com/baz</a> |
process() |
<a href="http://<a href="mailto:www.foo@bar.com">www.foo@bar.com</a>/baz"><a href="mailto:www.foo@bar.com">www.foo@bar.com</a>/baz</a> |
Individually processEmails() and processUrls() return acceptable results for both. Combining them (ie process()), results in something very wrong.
Reactions are currently unavailable