Remove mailto: scheme properly
This commit is contained in:
parent
2700739a3a
commit
9845cbbd81
@ -235,8 +235,10 @@ class HintActions:
|
||||
sel = (context.target == Target.yank_primary and
|
||||
utils.supports_selection())
|
||||
|
||||
urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
|
||||
urlstr = urlstr.lstrip('mailto:')
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user