Merge branch 'issue1987' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1987
This commit is contained in:
commit
5b11eaad85
@ -682,7 +682,11 @@ class CommandDispatcher:
|
|||||||
else:
|
else:
|
||||||
flags |= QUrl.FullyEncoded
|
flags |= QUrl.FullyEncoded
|
||||||
url = QUrl(self._current_url())
|
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()):
|
for key in dict(url_query.queryItems()):
|
||||||
if key in config.get('general', 'yank-ignored-url-parameters'):
|
if key in config.get('general', 'yank-ignored-url-parameters'):
|
||||||
url_query.removeQueryItem(key)
|
url_query.removeQueryItem(key)
|
||||||
|
@ -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
|
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"
|
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}
|
#### {clipboard} and {primary}
|
||||||
|
|
||||||
Scenario: Pasting a URL
|
Scenario: Pasting a URL
|
||||||
|
Loading…
Reference in New Issue
Block a user