Remove Apple signatures

This commit is contained in:
M66B 2023-11-10 22:05:55 +01:00
parent d4d27005ec
commit a40a70e020
1 changed files with 9 additions and 0 deletions

View File

@ -2745,6 +2745,15 @@ public class HtmlHelper {
// Outlook: <div id="Signature" data-lt-sig-active="">
d.body().select("#Signature").select("[data-lt-sig-active]").remove();
// Apple: <br id="lineBreakAtBeginningOfSignature"> <div dir="ltr">
for (Element br : d.body().select("#lineBreakAtBeginningOfSignature")) {
Element next = br.nextElementSibling();
if (next != null && "div".equals(next.tagName())) {
br.remove();
next.remove();
}
}
// Usenet style signature
d.body().filter(new NodeFilter() {
private boolean remove = false;