diff --git a/README.asciidoc b/README.asciidoc index fc710ac98..693e4fb44 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -160,13 +160,13 @@ Contributors, sorted by the number of commits in descending order: * Corentin Julé * meles5 * Philipp Hansch +* Daniel Karbach * Panagiotis Ktistakis * Kevin Velghe * Artur Shaik * Nathan Isom * Thorsten Wißmann * Austin Anderson -* Daniel Karbach * Jimmy * Niklas Haas * Alexey "Averrin" Nabrodov diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 8d1b00ed6..dc17c598f 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -682,7 +682,11 @@ class CommandDispatcher: else: flags |= QUrl.FullyEncoded url = QUrl(self._current_url()) - url_query = QUrlQuery(url) + url_query = QUrlQuery() + url_query_str = url.query() + if '&' not in url_query_str and ';' in url_query_str: + url_query.setQueryDelimiters('=', ';') + url_query.setQuery(url_query_str) for key in dict(url_query.queryItems()): if key in config.get('general', 'yank-ignored-url-parameters'): url_query.removeQueryItem(key) diff --git a/tests/end2end/features/yankpaste.feature b/tests/end2end/features/yankpaste.feature index abb59ad47..bc9bc7ab6 100644 --- a/tests/end2end/features/yankpaste.feature +++ b/tests/end2end/features/yankpaste.feature @@ -57,6 +57,24 @@ Feature: Yanking and pasting. Then the message "Yanked URL to clipboard: http://localhost:(port)/data/title with spaces.html" should be shown And the clipboard should contain "http://localhost:(port)/data/title with spaces.html" + Scenario: Yanking URL that has = and & in its query string + When I open data/title.html?a=b&c=d + And I run :yank + Then the message "Yanked URL to clipboard: http://localhost:(port)/data/title.html?a=b&c=d" should be shown + And the clipboard should contain "http://localhost:(port)/data/title.html?a=b&c=d" + + Scenario: Yanking URL that has = and ; in its query string + When I open data/title.html?a=b;c=d + And I run :yank + Then the message "Yanked URL to clipboard: http://localhost:(port)/data/title.html?a=b;c=d" should be shown + And the clipboard should contain "http://localhost:(port)/data/title.html?a=b;c=d" + + Scenario: Yanking URL with both & and ; in its query string + When I open data/title.html?a;b&c=d + And I run :yank + Then the message "Yanked URL to clipboard: http://localhost:(port)/data/title.html?a;b&c=d" should be shown + And the clipboard should contain "http://localhost:(port)/data/title.html?a;b&c=d" + #### {clipboard} and {primary} Scenario: Pasting a URL