From 1d002c4250cb105b73f7aea6e0f6bed90dd15e65 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 22 Mar 2022 20:25:54 +0100 Subject: [PATCH] Unfold BIMI selector --- 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 0724319f82..e16d103dbd 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1756,6 +1756,7 @@ public class MessageHelper { if (header == null) return null; + header = MimeUtility.unfold(header); header = header.toLowerCase(Locale.ROOT); int s = header.indexOf("s="); @@ -1766,7 +1767,7 @@ public class MessageHelper { if (e < 0) e = header.length(); - String selector = header.substring(s + 2, e); + String selector = header.substring(s + 2, e).trim(); if (TextUtils.isEmpty(selector)) return null;