From e3b9d9e599f6292248eb89c7571bd66f0aeb5278 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Feb 2020 17:42:20 +0100 Subject: [PATCH] Fixed double decode subject --- app/src/main/java/eu/faircode/email/MessageHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 46d15c815b..280cd37f6b 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -995,9 +995,10 @@ public class MessageHelper { if (subject == null) return null; + // https://github.com/eclipse-ee4j/mail/issues/423 + subject = subject.replaceAll("\\?=\\r?\\n\\s+=\\?", "\\?==\\?"); subject = MimeUtility.unfold(subject); - subject = new String(subject.getBytes(StandardCharsets.ISO_8859_1)); subject = decodeMime(subject); return subject;