Commit 164de2f5 authored by Volker Krause's avatar Volker Krause
Browse files

Explicitly handle MIME HTML elements

HTML in a MIME context can be extremely broken, to the point where none of
the following logic can recognize it automatically anymore. Yet it's MIME
type is usually correctly set (unlike for pretty much anything else).
parent 159668f1
......@@ -119,6 +119,8 @@ static void expandContentNode(ExtractorDocumentNode &node, KMime::Content *conte
ExtractorDocumentNode child;
if ((ct && ct->isPlainText() && fileName.isEmpty()) || (!ct && content->isTopLevel())) {
child = engine->documentNodeFactory()->createNode(content->decodedText(), u"text/plain");
} else if (ct && ct->isHTMLText()) {
child = engine->documentNodeFactory()->createNode(content->decodedContent(), fileName, u"text/html");
} else {
child = engine->documentNodeFactory()->createNode(content->decodedContent(), fileName);
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