@Test void controlCharacters() throws Exception { String htmlInput = "<p>\u0008</p>"; Document document = this.cleaner.clean(new StringReader(htmlInput)); String textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals(" ", textContent); assertHTML(" ", "\u0008"); htmlInput = "<p>&#8;</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p>&#8;</p>", "&#8;"); htmlInput = "<p foo=\"&#8;\">content</p>"; document = this.cleaner.clean(new StringReader(htmlInput)); textContent = document.getElementsByTagName("p").item(0).getAttributes().getNamedItem("foo").getTextContent(); assertEquals("&#8;", textContent); assertHTML("<p foo=\"&#8;\">content</p>", "<p foo=\"&#8;\">content</p>"); }
@Override public Document clean(Reader originalHtmlContent) { return clean(originalHtmlContent, getDefaultConfiguration()); }
DefaultHTMLCleaner implements HTMLCleaner { @Override public Document clean(Reader originalHtmlContent) { return clean(originalHtmlContent, getDefaultConfiguration()); } }
DefaultHTMLCleaner implements HTMLCleaner { @Override public Document clean(Reader originalHtmlContent) { return clean(originalHtmlContent, getDefaultConfiguration()); }  }
DefaultHTMLCleaner implements HTMLCleaner { @Override public Document clean(Reader originalHtmlContent) { return clean(originalHtmlContent, getDefaultConfiguration()); }  @Override Document clean(Reader originalHtmlContent); @Override Document clean(Reader originalHtmlContent, HTMLCleanerConfiguration configuration); @Override HTMLCleanerConfiguration getDefaultConfiguration(); }
DefaultHTMLCleaner implements HTMLCleaner { @Override public Document clean(Reader originalHtmlContent) { return clean(originalHtmlContent, getDefaultConfiguration()); }  @Override Document clean(Reader originalHtmlContent); @Override Document clean(Reader originalHtmlContent, HTMLCleanerConfiguration configuration); @Override HTMLCleanerConfiguration getDefaultConfiguration();  }