Fix loading of quickmarks with fuzzy URLs
This commit is contained in:
parent
881e45d9eb
commit
f0990aec32
@ -770,8 +770,7 @@ class CommandDispatcher:
|
||||
bg: Load the quickmark in a new background tab.
|
||||
window: Load the quickmark in a new window.
|
||||
"""
|
||||
urlstr = quickmarks.get(name)
|
||||
url = QUrl(urlstr)
|
||||
url = quickmarks.get(name)
|
||||
self._open(url, tab, bg, window)
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', name='inspector',
|
||||
|
@ -108,8 +108,9 @@ def get(name):
|
||||
raise cmdexc.CommandError(
|
||||
"Quickmark '{}' does not exist!".format(name))
|
||||
urlstr = marks[name]
|
||||
url = QUrl(urlstr)
|
||||
if not url.isValid():
|
||||
try:
|
||||
url = urlutils.fuzzy_url(urlstr)
|
||||
except urlutils.FuzzyUrlError:
|
||||
raise cmdexc.CommandError(
|
||||
"Invalid URL for quickmark {}: {} ({})".format(name, urlstr,
|
||||
url.errorString()))
|
||||
|
Loading…
Reference in New Issue
Block a user