mirror of https://github.com/M66B/FairEmail.git
Fixed displaying Usenet signature with format flowed
This commit is contained in:
parent
ba78e99202
commit
58a98dd083
|
@ -1459,8 +1459,15 @@ public class MessageHelper {
|
||||||
|
|
||||||
if (part.isMimeType("text/plain")) {
|
if (part.isMimeType("text/plain")) {
|
||||||
// https://tools.ietf.org/html/rfc3676
|
// https://tools.ietf.org/html/rfc3676
|
||||||
if ("flowed".equalsIgnoreCase(ct.getParameter("format")))
|
if ("flowed".equalsIgnoreCase(ct.getParameter("format"))) {
|
||||||
result = result.replaceAll(" \\r?\\n", " ");
|
StringBuilder flowed = new StringBuilder();
|
||||||
|
for (String line : result.split("\\r?\\n")) {
|
||||||
|
flowed.append(line);
|
||||||
|
if (!line.endsWith(" ") || "-- ".equals(line))
|
||||||
|
flowed.append("\r\n");
|
||||||
|
}
|
||||||
|
result = flowed.toString();
|
||||||
|
}
|
||||||
result = "<div>" + HtmlHelper.formatPre(result) + "</div>";
|
result = "<div>" + HtmlHelper.formatPre(result) + "</div>";
|
||||||
} else if (part.isMimeType("text/html")) {
|
} else if (part.isMimeType("text/html")) {
|
||||||
if (TextUtils.isEmpty(charset)) {
|
if (TextUtils.isEmpty(charset)) {
|
||||||
|
|
Loading…
Reference in New Issue