diff --git a/messageviewer/autotests/data/encapsulated-with-attachment.mbox b/messageviewer/autotests/data/encapsulated-with-attachment.mbox --- a/messageviewer/autotests/data/encapsulated-with-attachment.mbox +++ b/messageviewer/autotests/data/encapsulated-with-attachment.mbox @@ -12,7 +12,7 @@ Content-Transfer-Encoding: 7bit Content-Disposition: inline -This is the encapsulating message. +This is the first encapsulating message. --Boundary-00=_zmUeKB+A8hGfCVZ Content-Type: message/rfc822; @@ -37,7 +37,7 @@ -This is the encapsulated message. +This is the second encapsulated message. --Boundary-00=_WmUeKQpGb0DHyx1 Content-Type: text/plain; diff --git a/messageviewer/autotests/data/encapsulated-with-attachment.mbox.html b/messageviewer/autotests/data/encapsulated-with-attachment.mbox.html --- a/messageviewer/autotests/data/encapsulated-with-attachment.mbox.html +++ b/messageviewer/autotests/data/encapsulated-with-attachment.mbox.html @@ -383,7 +383,7 @@
"));
+ if (!mLink)
+ mWriter->queue(QLatin1String("asHREF(mNode, QStringLiteral("body")) + QLatin1String("\">")
+ + label + QLatin1String(""));
+ else {
+ mWriter->queue(label);
+ }
+ if (!comment.isEmpty()) {
+ mWriter->queue(QLatin1String(" ") + comment); + } + mWriter->queue(QLatin1String(" |
")); +} + +void TextBlock::internalExit() +{ + if (!entered) { + return; + } + + entered = false; + + mWriter->queue(QStringLiteral(" |
");
- if (!fileName.isEmpty())
- htmlStr += QLatin1String("asHREF(curNode, QStringLiteral("body")) + QLatin1String("\">")
- + label + QLatin1String("");
- else {
- htmlStr += label;
- }
- if (!comment.isEmpty()) {
- htmlStr += QLatin1String(" ") + comment; - } - htmlStr += QLatin1String(" |
"); - - htmlWriter()->queue(htmlStr); - } // process old style not-multipart Mailman messages to // enable verification of the embedded messages' signatures if (!isMailmanMessage(curNode) || !processMailmanMessage(curNode)) { - const QString oldPlainText = mPlainTextContent; - writeBodyString(curNode->decodedContent(), NodeHelper::fromAsString(curNode), - codecFor(curNode), result, !bDrawFrame); - // Revert changes to mPlainTextContent made by writeBodyString if this is not the first - // text part. The plain text content shall not contain any text/plain attachment, as it is content - // of the main text node. - if (!isFirstTextPart) { - mPlainTextContent = oldPlainText; + TextMessagePart mp(this, curNode, bDrawFrame, !fileName.isEmpty()); + mp.html(!bDrawFrame); + + if (isFirstTextPart) { + mPlainTextContent = mp.text(); } + mNodeHelper->setNodeDisplayedEmbedded(curNode, true); } - if (bDrawFrame && htmlWriter()) { - htmlWriter()->queue(QStringLiteral(" |