fweinaug/expandable_text

Bug in detection urls

Urkman opened this issue · 4 comments

There is currently a bug in detection urls.
A text like "test..." is detected as a url.

Screenshot...
Bildschirmfoto 2021-05-27 um 11 09 14

Perhaps use this RegEx:

r'(?:(?:https?|ftp):\/\/)?[-a-z0-9@:%._\+~#=]{1,256}\.[a-z0-9]{1,6}(\/[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)?'

I wrote a possible approach to this issue in #21

thank you for creating the issue! I just released version 2.3 which should fix this problem by using your regex.