Commit a81f8e43 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix show address as RFC2047

parent 51828453
...@@ -418,7 +418,7 @@ QString emailAddrAsAnchor(const KMime::Types::Mailbox::List &mailboxList, Displa ...@@ -418,7 +418,7 @@ QString emailAddrAsAnchor(const KMime::Types::Mailbox::List &mailboxList, Displa
const QString i18nMe = i18nc("signal that this email is defined in my identity", "Me"); const QString i18nMe = i18nc("signal that this email is defined in my identity", "Me");
const bool onlyOneIdentity = (im->identities().count() == 1); const bool onlyOneIdentity = (im->identities().count() == 1);
for (const KMime::Types::Mailbox &mailbox : mailboxList) { for (const KMime::Types::Mailbox &mailbox : mailboxList) {
const QString prettyAddressStr = mailbox.prettyAddress(); const QString prettyAddressStr = KCodecs::decodeRFC2047String(mailbox.prettyAddress());
if (!prettyAddressStr.isEmpty()) { if (!prettyAddressStr.isEmpty()) {
numberAddresses++; numberAddresses++;
if (expandable == ExpandableAddresses && !expandableInserted && numberAddresses > collapseNumber) { if (expandable == ExpandableAddresses && !expandableInserted && numberAddresses > collapseNumber) {
...@@ -447,7 +447,7 @@ QString emailAddrAsAnchor(const KMime::Types::Mailbox::List &mailboxList, Displa ...@@ -447,7 +447,7 @@ QString emailAddrAsAnchor(const KMime::Types::Mailbox::List &mailboxList, Displa
result += foundMe ? i18nMe : quoteHtmlChars(prettyAddressStr, true); result += foundMe ? i18nMe : quoteHtmlChars(prettyAddressStr, true);
} }
} else { } else {
result += foundMe ? i18nMe : quoteHtmlChars(mailbox.prettyAddress(KMime::Types::Mailbox::QuoteWhenNecessary), true); result += foundMe ? i18nMe : quoteHtmlChars(KCodecs::decodeRFC2047String(mailbox.prettyAddress(KMime::Types::Mailbox::QuoteWhenNecessary)), true);
} }
if (link == ShowLink) { if (link == ShowLink) {
result += QLatin1String("</a>, "); result += QLatin1String("</a>, ");
......
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