Merge branch 'strip-mailto' of https://github.com/blyxxyz/qutebrowser into blyxxyz-strip-mailto
This commit is contained in:
commit
c1f2f0ac06
@ -235,7 +235,10 @@ class HintActions:
|
||||
sel = (context.target == Target.yank_primary and
|
||||
utils.supports_selection())
|
||||
|
||||
urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
|
||||
flags = QUrl.FullyEncoded | QUrl.RemovePassword
|
||||
if url.scheme() == 'mailto':
|
||||
flags |= QUrl.RemoveScheme
|
||||
urlstr = url.toString(flags)
|
||||
utils.set_clipboard(urlstr, selection=sel)
|
||||
|
||||
msg = "Yanked URL to {}: {}".format(
|
||||
|
11
tests/end2end/data/email_address.html
Normal file
11
tests/end2end/data/email_address.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Email address</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="mailto:nobody">Email address</a>
|
||||
</body>
|
||||
</html>
|
@ -99,6 +99,12 @@ Feature: Using hints
|
||||
And I hint with args "links yank-primary" and follow a
|
||||
Then the clipboard should contain "http://localhost:(port)/data/hello.txt"
|
||||
|
||||
Scenario: Yanking email address to clipboard
|
||||
When I run :debug-set-fake-clipboard
|
||||
And I open data/email_address.html
|
||||
And I hint with args "links yank" and follow a
|
||||
Then the clipboard should contain "nobody"
|
||||
|
||||
Scenario: Rapid hinting
|
||||
When I open data/hints/rapid.html in a new tab
|
||||
And I run :tab-only
|
||||
|
Loading…
Reference in New Issue
Block a user