Remove mailto: scheme properly

This commit is contained in:
Jan Verbeek 2017-01-21 23:19:15 +01:00
parent 2700739a3a
commit 9845cbbd81

View File

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