diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index ba6616e3ad..bf174b7c03 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1459,8 +1459,15 @@ public class MessageHelper { if (part.isMimeType("text/plain")) { // https://tools.ietf.org/html/rfc3676 - if ("flowed".equalsIgnoreCase(ct.getParameter("format"))) - result = result.replaceAll(" \\r?\\n", " "); + if ("flowed".equalsIgnoreCase(ct.getParameter("format"))) { + 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 = "