diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 473906132..5e899aba1 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -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) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 69b658c98..3d74fc266 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -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), }