Handle URLs with double-colon at the beginning as search strings
Closes #544. We might also merge #542 now.
This commit is contained in:
parent
0f5391c4fa
commit
4fa64350ca
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user