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

Some urls are not properly linked #239

Closed lpetrov closed 5 years ago

lpetrov commented 6 years ago

Just got a super weird URL, which seems to not be linked properly. For example: "https://www.aktuality.sk/clanok/595960/v-kauze-zbiteho-svedka-na-policajnej-stanici-unikla-citliva-nahravka/?AT=wgt.article_clanok-najcitanejsie.c.x...B." (random link that contains "." at the end) Is not properly linked with the last "."

gregjacobs commented 5 years ago

Well that definitely is a werid URL indeed, but Autolinker currently treats the last period as the end of a sentence because that's the most general use case of what users type into comment boxes and such. If we were to link the trailing period, then links at the end of a sentence would be wrong: http://google.com.

I don't think we can fix this one - sorry!