|
|
@ -3076,6 +3076,7 @@ public class HtmlHelper {
|
|
|
|
static void cleanup(Document d) {
|
|
|
|
static void cleanup(Document d) {
|
|
|
|
// https://www.chromestatus.com/feature/5756335865987072
|
|
|
|
// https://www.chromestatus.com/feature/5756335865987072
|
|
|
|
// Some messages contain 100 thousands of Apple spaces
|
|
|
|
// Some messages contain 100 thousands of Apple spaces
|
|
|
|
|
|
|
|
if (false)
|
|
|
|
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) {
|
|
|
@ -3084,6 +3085,7 @@ public class HtmlHelper {
|
|
|
|
aspace.remove();
|
|
|
|
aspace.remove();
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
aspace.replaceWith(new TextNode(" "));
|
|
|
|
aspace.replaceWith(new TextNode(" "));
|
|
|
|
|
|
|
|
Log.i("Replaced Apple-converted-space");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|