Fix spaces in mime encoded protected subjects

pull/197/head
M66B 4 years ago
parent 7133ffe990
commit 43b65d1de5

@ -2498,9 +2498,11 @@ public class MessageHelper {
ContentType ct = new ContentType(part.getContentType());
if ("v1".equals(ct.getParameter("protected-headers"))) {
String[] subject = part.getHeader("subject");
if (subject != null && subject.length != 0)
if (subject != null && subject.length != 0) {
subject[0] = subject[0].replaceAll("\\?=[\\r\\n\\t ]+=\\?", "\\?==\\?");
parts.protected_subject = decodeMime(subject[0]);
}
}
} catch (Throwable ex) {
Log.e(ex);
}

Loading…
Cancel
Save