diff --git a/app/src/main/java/eu/faircode/email/ActivityEML.java b/app/src/main/java/eu/faircode/email/ActivityEML.java index e0f061fa76..f6ea69b5c7 100644 --- a/app/src/main/java/eu/faircode/email/ActivityEML.java +++ b/app/src/main/java/eu/faircode/email/ActivityEML.java @@ -179,7 +179,7 @@ public class ActivityEML extends ActivityBase { if (html != null) { Document parsed = JsoupEx.parse(html); Document document = HtmlHelper.sanitizeView(context, parsed, false); - result.body = HtmlHelper.fromHtml(document.html()); + result.body = HtmlHelper.fromDocument(document); } return result; diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 84fdbcb742..16e1affce5 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1924,7 +1924,7 @@ public class AdapterMessage extends RecyclerView.Adapter"; } Document document = HtmlHelper.sanitizeCompose(context, html, false); - Spanned paste = HtmlHelper.fromHtml(document.html()); + Spanned paste = HtmlHelper.fromDocument(document); int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary); diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 63dbcbb1cd..aac3fe8ff0 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -1748,6 +1748,14 @@ public class HtmlHelper { return false; } + static Spanned fromDocument(@NonNull Document document) { + return fromDocument(document, null, null); + } + + static Spanned fromDocument(@NonNull Document document, @Nullable Html.ImageGetter imageGetter, @Nullable Html.TagHandler tagHandler) { + return fromHtml(document.html(), imageGetter, null); + } + static Spanned fromHtml(@NonNull String html) { return fromHtml(html, null, null); }