@Test public void testSafeRemoveAllTags() { logger.info("safeRemoveAllTags"); String text = "<script>hidden</script>some <a href=\"asd\">hyperlink</a> and <br/> some <br> more<br><span>text</span> here"; String expResult = " some hyperlink and some more text here"; String result = HTMLParser.safeRemoveAllTags(text); assertEquals(expResult, result); }
public static String safeRemoveAllTags(String html) { html = removeNonTextTags(html); html = unsafeRemoveAllTags(html); return html; }
HTMLParser { public static String safeRemoveAllTags(String html) { html = removeNonTextTags(html); html = unsafeRemoveAllTags(html); return html; } }
HTMLParser { public static String safeRemoveAllTags(String html) { html = removeNonTextTags(html); html = unsafeRemoveAllTags(html); return html; }  }
HTMLParser { public static String safeRemoveAllTags(String html) { html = removeNonTextTags(html); html = unsafeRemoveAllTags(html); return html; }  static String replaceImgWithAlt(String html); static String removeComments(String html); static String unsafeRemoveAllTags(String html); static String safeRemoveAllTags(String html); static String removeNonTextTagsAndAttributes(String html); static String extractText(String html); static String extractTitle(String html); static Map<HyperlinkPart, List<String>> extractHyperlinks(String html); static Map<String, String> extractMetatags(String html); static Map<String, List<String>> extractHTMLheaders(String html); }
HTMLParser { public static String safeRemoveAllTags(String html) { html = removeNonTextTags(html); html = unsafeRemoveAllTags(html); return html; }  static String replaceImgWithAlt(String html); static String removeComments(String html); static String unsafeRemoveAllTags(String html); static String safeRemoveAllTags(String html); static String removeNonTextTagsAndAttributes(String html); static String extractText(String html); static String extractTitle(String html); static Map<HyperlinkPart, List<String>> extractHyperlinks(String html); static Map<String, String> extractMetatags(String html); static Map<String, List<String>> extractHTMLheaders(String html);  }