From 36c6d7ef0c512a081903a78926de5b5727712565 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 26 Jan 2020 10:45:13 +0100 Subject: [PATCH] Fixed subject decoding in case of multiple MIME words --- app/src/main/java/eu/faircode/email/MessageHelper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 1931ecf1b5..15d02093f5 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -974,7 +974,7 @@ public class MessageHelper { return null; subject = MimeUtility.unfold(subject); - //subject = subject.replaceAll("\\?=\\s+=\\?", "\\?==\\?"); + subject = subject.replaceAll("\\?=\\s+=\\?", "\\?==\\?"); subject = new String(subject.getBytes(StandardCharsets.ISO_8859_1)); subject = decodeMime(subject); @@ -1116,7 +1116,6 @@ public class MessageHelper { parts.add(new MimeTextPart(text.substring(i))); // Fold words to not break encoding - /* int p = 0; while (p + 1 < parts.size()) { MimeTextPart p1 = parts.get(p); @@ -1128,7 +1127,6 @@ public class MessageHelper { } else p++; } - */ StringBuilder sb = new StringBuilder(); for (MimeTextPart part : parts)