Commit b5411e67 authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 363586 - Kmail2 handles mailto: incorrectly. urlencoded does not work

FIXED-IN: 5.3.0
BUG: 363586
parent 4ecfbd09
......@@ -373,7 +373,8 @@ bool KMKernel::handleCommandLine(bool noArgsOpensReader, const QStringList &args
// not called with "-session foo"
for (const QString &arg : parser.positionalArguments()) {
if (arg.startsWith(QStringLiteral("mailto:"), Qt::CaseInsensitive)) {
QMap<QString, QString> values = MessageCore::StringUtil::parseMailtoUrl(QUrl::fromUserInput(arg));
const QUrl urlDecoded(QUrl::fromPercentEncoding(arg.toUtf8()));
QMap<QString, QString> values = MessageCore::StringUtil::parseMailtoUrl(urlDecoded);
if (!values.value(QStringLiteral("to")).isEmpty()) {
to += values.value(QStringLiteral("to")) + QStringLiteral(", ");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment