diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 44a796a5fe..dd4770682f 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1696,6 +1696,7 @@ public class AdapterMessage extends RecyclerView.Adapter ... // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/hh801214(v=vs.85) @@ -1197,6 +1197,16 @@ public class HtmlHelper { return ssb; } + static void cleanup(Document d) { + for (Element aspace : d.select(".Apple-converted-space")) + if (aspace.previousSibling() instanceof TextNode) { + TextNode tnode = (TextNode) aspace.previousSibling(); + tnode.text(tnode.text() + " "); + aspace.remove(); + } else + aspace.replaceWith(new TextNode(" ")); + } + static boolean truncate(Document d, boolean reformat) { int at = (reformat ? MAX_FORMAT_TEXT_SIZE : MAX_FULL_TEXT_SIZE);