Merge branch 'lahwaacz-pretty-url'

This commit is contained in:
Florian Bruhin 2016-09-26 07:08:52 +02:00
commit aec887bc46
2 changed files with 4 additions and 2 deletions

View File

@ -677,7 +677,9 @@ class CommandDispatcher:
"""Helper method for yank() to get the URL to copy."""
assert what in ['url', 'pretty-url'], what
flags = QUrl.RemovePassword
if what != 'pretty-url':
if what == 'pretty-url':
flags |= QUrl.DecodeReserved
else:
flags |= QUrl.FullyEncoded
url = QUrl(self._current_url())
url_query = QUrlQuery(url)

View File

@ -54,7 +54,7 @@ def replace_variables(win_id, arglist):
'url': lambda: _current_url(tabbed_browser).toString(
QUrl.FullyEncoded | QUrl.RemovePassword),
'url:pretty': lambda: _current_url(tabbed_browser).toString(
QUrl.RemovePassword),
QUrl.DecodeReserved | QUrl.RemovePassword),
'clipboard': utils.get_clipboard,
'primary': lambda: utils.get_clipboard(selection=True),
}