mirror of https://github.com/M66B/FairEmail.git
Small fix
This commit is contained in:
parent
8913b00652
commit
5870856402
|
@ -1198,11 +1198,13 @@ public class HtmlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cleanup(Document d) {
|
static void cleanup(Document d) {
|
||||||
|
// https://www.chromestatus.com/feature/5756335865987072
|
||||||
|
// Some messages contain 100 thousands of Apple spaces
|
||||||
for (Element aspace : d.select(".Apple-converted-space")) {
|
for (Element aspace : d.select(".Apple-converted-space")) {
|
||||||
Node next = aspace.nextSibling();
|
Node next = aspace.nextSibling();
|
||||||
if (next instanceof TextNode) {
|
if (next instanceof TextNode) {
|
||||||
TextNode tnode = (TextNode) next;
|
TextNode tnode = (TextNode) next;
|
||||||
tnode.text(tnode.text() + " ");
|
tnode.text(" " + tnode.text());
|
||||||
aspace.remove();
|
aspace.remove();
|
||||||
} else
|
} else
|
||||||
aspace.replaceWith(new TextNode(" "));
|
aspace.replaceWith(new TextNode(" "));
|
||||||
|
|
Loading…
Reference in New Issue