urlutils: Strip URL before testing.
This commit is contained in:
parent
892c02268a
commit
96c1d53222
@ -126,6 +126,7 @@ class IsUrlTests(unittest.TestCase):
|
||||
'http://foobar',
|
||||
'localhost:8080',
|
||||
'qutebrowser.org',
|
||||
' qutebrowser.org ',
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
'2001:41d0:2:6c11::1',
|
||||
|
@ -193,6 +193,8 @@ def is_url(urlstr):
|
||||
|
||||
log.url.debug("Checking if '{}' is a URL (autosearch={}).".format(
|
||||
urlstr, autosearch))
|
||||
|
||||
url = urlstr.strip()
|
||||
qurl = QUrl(urlstr)
|
||||
|
||||
if not autosearch:
|
||||
|
Loading…
Reference in New Issue
Block a user