Don't treat "Hello." as URL with auto-search=naive
This commit is contained in:
parent
f45c4d73f4
commit
a17b8bec90
@ -127,7 +127,8 @@ def _is_url_naive(urlstr):
|
||||
if not QHostAddress(urlstr).isNull():
|
||||
return False
|
||||
|
||||
return '.' in url.host()
|
||||
host = url.host()
|
||||
return '.' in host and not host.endswith('.')
|
||||
|
||||
|
||||
def _is_url_dns(urlstr):
|
||||
|
@ -336,6 +336,7 @@ def test_get_search_url_invalid(urlutils_config_stub, url):
|
||||
(False, True, False, '23.42'), # no DNS because bogus-IP
|
||||
(False, True, False, '1337'), # no DNS because bogus-IP
|
||||
(False, True, True, 'deadbeef'),
|
||||
(False, True, True, 'hello.'),
|
||||
# no DNS because bogus-IP
|
||||
pytest.mark.xfail(qtutils.version_check('5.6.1'),
|
||||
reason='Qt behavior changed')(
|
||||
|
Loading…
Reference in New Issue
Block a user