diff --git a/README.asciidoc b/README.asciidoc index 777af1807..16e9f240d 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -137,10 +137,10 @@ Contributors, sorted by the number of commits in descending order: * Peter Vilim * John ShaggyTwoDope Jenkins * rikn00 +* Patric Schmitz * Martin Zimmermann * Error 800 * Brian Jackson -* Patric Schmitz * Johannes Altmanninger * Samir Benmendil * Regina Hug diff --git a/qutebrowser/test/utils/test_urlutils.py b/qutebrowser/test/utils/test_urlutils.py index a1e1f9e9d..b76ea09b4 100644 --- a/qutebrowser/test/utils/test_urlutils.py +++ b/qutebrowser/test/utils/test_urlutils.py @@ -155,6 +155,7 @@ class IsUrlTests(unittest.TestCase): 'deadbeef', '31c3', 'http:foo:0', + 'foo::bar', ) @mock.patch('qutebrowser.utils.urlutils.config', new=stubs.ConfigStub( diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index bb19930bc..014aabb9f 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -193,7 +193,14 @@ def _has_explicit_scheme(url): Args: url: The URL as QUrl. """ - return url.isValid() and url.scheme() and not url.path().startswith(' ') + + # Note that generic URI syntax actually would allow a second colon + # after the scheme delimiter. Since we don't know of any URIs + # using this and want to support e.g. searching for scoped C++ + # symbols, we treat this as not an URI anyways. + return (url.isValid() and url.scheme() + and not url.path().startswith(' ') + and not url.path().startswith(':')) def is_special_url(url):