Closed JayFields closed 5 years ago
Interesting, thanks for the issue and suggested fix! I'll dig into this a little and see if I can get a new version pushed out to fix this and #27 on Friday.
Alright I wrote some tests for this and your change looks perfect. I'll get it shipped tomorrow. :+1:
Great, thanks!
Pushed to PyPI as v1.13.0. Thanks again for the fix.
Given defanged URLs with an IP address or a subdomain such as:
hXXps://192.168.149[.]100/api/info hXXps://subdomain.example[.]com/some/path
The
GENERIC_URL_RE
regex returns the correct results. However, since they are also parsed with theBRACKET_URL_RE
regex additional invalid results are also returned:http://149.100/api/info http://example.com/some/path
A simple change seems to fix the problem--assuming I'm not missing some false positive scenario.