diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 04bb9977ea..13a84e77ae 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -1792,6 +1792,18 @@ public class HtmlHelper { SpannableStringBuilder ssb = fromDocument(context, d, null, null); + for (StyleSpan span : ssb.getSpans(0, ssb.length(), StyleSpan.class)) { + int start = ssb.getSpanStart(span); + int end = ssb.getSpanEnd(span); + if (span.getStyle() == Typeface.ITALIC) { + ssb.insert(end, "*"); + ssb.insert(start, "*"); + } else if (span.getStyle() == Typeface.BOLD) { + ssb.insert(end, "**"); + ssb.insert(start, "**"); + } + } + for (URLSpan span : ssb.getSpans(0, ssb.length(), URLSpan.class)) { String url = span.getURL(); if (TextUtils.isEmpty(url))