diff --git a/app/src/main/java/eu/faircode/email/ServiceUI.java b/app/src/main/java/eu/faircode/email/ServiceUI.java index 59e4c5fd25..aa08b3fef1 100644 --- a/app/src/main/java/eu/faircode/email/ServiceUI.java +++ b/app/src/main/java/eu/faircode/email/ServiceUI.java @@ -338,9 +338,8 @@ public class ServiceUI extends IntentService { " inner=" + inner + (inner == null ? "" : " extras: " + TextUtils.join(" ", Log.getExtras(inner.getExtras()))) + " results: " + Log.getExtras(results)); - String body = results.getString("text"); - if (body != null) - body = "

" + body.replaceAll("\\r?\\n", "
") + "

"; + Object obj = results.get("text"); + String body = (obj == null ? null : "

" + obj.toString().replaceAll("\\r?\\n", "
") + "

"); String text = HtmlHelper.getFullText(body); String language = HtmlHelper.getLanguage(this, ref.subject, text);