@Test public void shouldStripSignatureFromThunderbirdStyleHtml() throws Exception { String html = "<html>\r\n" + " <head>\r\n" + " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\r\n" + " </head>\r\n" + " <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n" + " <p>This is the body text<br>\r\n" + " </p>\r\n" + " -- <br>\r\n" + " <div class=\"moz-signature\">Sent from my Android device with K-9 Mail." + " Please excuse my brevity.</div>\r\n" + " </body>\r\n" + "</html>"; String withoutSignature = HtmlSignatureRemover.stripSignature(html); assertEquals("This is the body text", extractText(withoutSignature)); }
public static String stripSignature(String content) { return new HtmlSignatureRemover().stripSignatureInternal(content); }
HtmlSignatureRemover { public static String stripSignature(String content) { return new HtmlSignatureRemover().stripSignatureInternal(content); } }
HtmlSignatureRemover { public static String stripSignature(String content) { return new HtmlSignatureRemover().stripSignatureInternal(content); }  }
HtmlSignatureRemover { public static String stripSignature(String content) { return new HtmlSignatureRemover().stripSignatureInternal(content); }  static String stripSignature(String content); }
HtmlSignatureRemover { public static String stripSignature(String content) { return new HtmlSignatureRemover().stripSignatureInternal(content); }  static String stripSignature(String content);  }