From b4be7c35fa0e53f255cc9b62392ed907335bacb1 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 20 Mar 2023 11:04:06 +0100 Subject: [PATCH] Fixed decoding of addresses --- app/src/main/java/eu/faircode/email/MessageHelper.java | 2 +- app/src/main/java/javax/mail/internet/InternetAddress.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 6d33145666..7d4a62327d 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -3119,7 +3119,7 @@ public class MessageHelper { return email; } - static String decodeMime(String text) { + public static String decodeMime(String text) { if (text == null) return null; diff --git a/app/src/main/java/javax/mail/internet/InternetAddress.java b/app/src/main/java/javax/mail/internet/InternetAddress.java index 7de876eba5..499c54a3ab 100644 --- a/app/src/main/java/javax/mail/internet/InternetAddress.java +++ b/app/src/main/java/javax/mail/internet/InternetAddress.java @@ -253,7 +253,7 @@ public class InternetAddress extends Address implements Cloneable { if (encodedPersonal != null) { try { - personal = MimeUtility.decodeText(encodedPersonal); + personal = eu.faircode.email.MessageHelper.decodeMime(encodedPersonal); return personal; } catch (Exception ex) { // 1. ParseException: either its an unencoded string or