Support for format flowed

This commit is contained in:
M66B
2020-03-07 08:41:43 +01:00
parent 323b009bb2
commit 94e1b9bc5e

View File

@@ -1406,8 +1406,13 @@ public class MessageHelper {
Log.e(ex);
}
if (part.isMimeType("text/plain"))
if (part.isMimeType("text/plain")) {
ContentType ct = new ContentType(part.getContentType());
// https://tools.ietf.org/html/rfc3676
if ("flowed".equalsIgnoreCase(ct.getParameter("format")))
result = result.replaceAll(" \\r?\\n", " ");
result = "<div>" + HtmlHelper.formatPre(result) + "</div>";
}
sb.append(result);
}