@Test void entitiesWithTranslation() { String content = "<p>1&gt;2&amp;3&nbsp;4&frac12;5öüäăâîș</p>"; String expectedContent = "1>2&3 4½5öüäăâîș"; Document document = this.cleaner.clean(new StringReader(content)); String obtainedContent = document.getElementsByTagName("p").item(0).getTextContent(); assertEquals(expectedContent, obtainedContent); assertHTML("<p>1&gt;2&amp;3 4½5öüäăâîș</p>", content); HTMLCleanerConfiguration htmlCleanerConfiguration = new DefaultHTMLCleanerConfiguration(); htmlCleanerConfiguration .setParameters(Collections.singletonMap(HTMLCleanerConfiguration.TRANSLATE_SPECIAL_ENTITIES, "true")); assertHTML("<p>1&amp;gt;2&amp;amp;3 4½5öüäăâîș</p>", "<p>1&gt;2&amp;3&nbsp;4&frac12;5öüäăâîș</p>", htmlCleanerConfiguration); }
@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();  }