Disabling Apple-converted-space

pull/214/head
M66B 1 year ago
parent de4561fac6
commit 2d07650db8

@ -3076,15 +3076,17 @@ public class HtmlHelper {
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")) {
Node next = aspace.nextSibling();
if (next instanceof TextNode) {
TextNode tnode = (TextNode) next;
tnode.text(" " + tnode.text());
aspace.remove();
} else
aspace.replaceWith(new TextNode(" "));
}
if (false)
for (Element aspace : d.select(".Apple-converted-space")) {
Node next = aspace.nextSibling();
if (next instanceof TextNode) {
TextNode tnode = (TextNode) next;
tnode.text(" " + tnode.text());
aspace.remove();
} else
aspace.replaceWith(new TextNode(" "));
Log.i("Replaced Apple-converted-space");
}
}
static void quoteLimit(Document d, int maxLevel) {

Loading…
Cancel
Save