Merge branch 'issue1987' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1987

This commit is contained in:
Florian Bruhin 2016-10-03 06:45:01 +02:00
commit 5b11eaad85
2 changed files with 23 additions and 1 deletions

View File

@ -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)

View File

@ -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