gregjacobs / Autolinker.js

Utility to Automatically Link URLs, Email Addresses, Phone Numbers, Twitter handles, and Hashtags in a given block of text/HTML
MIT License
1.48k stars 238 forks source link

Autolinker parses "hello:.........world" as a link. Why? #116

Closed danneu closed 7 years ago

danneu commented 9 years ago

I use Autolinker.js to parse links in my website's chatbox. Some user's text was parsed as a link and it was of the format <text>:.<text> where the number of periods can be 1+, e.g. hello:...world and hello:wo.....rld will linkify.

Seems a bit aggressive even if it may be technically correct according to some spec.

What do you think?

erwinvaneyk commented 8 years ago

.world is a gTLD so that would explain why it is converted. However, a domain cannot have multiple consecutive dots in its domain-name (see https://lists.isc.org/pipermail/bind-users/2011-January/082725.html). So in my opinion this is a bug.

gregjacobs commented 8 years ago

Good call, definitely too aggressive. Will see what I can do.