@Test public void testControlCharacter() { assertEquals("William J. Baker", sanitize("William J. Baker" + ((char) 0))); assertEquals("<p>William J. Baker</p>", sanitize("<p>William J. Baker" + ((char) 0) + "</p>")); assertEquals("William J. Baker says hi!", sanitize("William J. Baker" + ((char) 0) + " says hi!")); }
public static String sanitize(String unclean) { if (Strings.isNullOrEmpty(unclean)) { return unclean; } else { unclean = unclean.replace("\0", ""); return Jsoup.clean(unclean, html); } }
HtmlSanitizer { public static String sanitize(String unclean) { if (Strings.isNullOrEmpty(unclean)) { return unclean; } else { unclean = unclean.replace("\0", ""); return Jsoup.clean(unclean, html); } } }
HtmlSanitizer { public static String sanitize(String unclean) { if (Strings.isNullOrEmpty(unclean)) { return unclean; } else { unclean = unclean.replace("\0", ""); return Jsoup.clean(unclean, html); } }  }
HtmlSanitizer { public static String sanitize(String unclean) { if (Strings.isNullOrEmpty(unclean)) { return unclean; } else { unclean = unclean.replace("\0", ""); return Jsoup.clean(unclean, html); } }  static String sanitize(String unclean); static String strip(String unclean); }
HtmlSanitizer { public static String sanitize(String unclean) { if (Strings.isNullOrEmpty(unclean)) { return unclean; } else { unclean = unclean.replace("\0", ""); return Jsoup.clean(unclean, html); } }  static String sanitize(String unclean); static String strip(String unclean);  }