@Test public void testHTMLallowedSanitizeString() { String script = "<script>foo</script>"; String html = "<table>"; script = WebSecurityUtils.sanitizeString(script, true); html = WebSecurityUtils.sanitizeString(html, true); assertTrue("Script is sanitized with HTML allowed", script.equals("<&#x73;cript>foo</&#x73;cript>")); assertTrue("HtmlTable is sanitized with HTML allowed, so unchanged", html.equals("<table>")); }
public static String[] sanitizeString(String[] raw) { for (int i = 0; i < raw.length; i++) { raw[i] = sanitizeString(raw[i]); } return raw; }
WebSecurityUtils { public static String[] sanitizeString(String[] raw) { for (int i = 0; i < raw.length; i++) { raw[i] = sanitizeString(raw[i]); } return raw; } }
WebSecurityUtils { public static String[] sanitizeString(String[] raw) { for (int i = 0; i < raw.length; i++) { raw[i] = sanitizeString(raw[i]); } return raw; }  }
WebSecurityUtils { public static String[] sanitizeString(String[] raw) { for (int i = 0; i < raw.length; i++) { raw[i] = sanitizeString(raw[i]); } return raw; }  static String[] sanitizeString(String[] raw); static String sanitizeString(String raw); static String sanitizeString(String raw, boolean allowHTML); static int[] safeParseInt(String[] dirty); static int safeParseInt(String dirty); static long safeParseLong(String dirty); static float safeParseFloat(String dirty); static double safeParseDouble(String dirty); static String sanitizeDbColumnName(String dirty); static T sanitizeBeanStringProperties(T bean, Set<String> allowHtmlFields); }
WebSecurityUtils { public static String[] sanitizeString(String[] raw) { for (int i = 0; i < raw.length; i++) { raw[i] = sanitizeString(raw[i]); } return raw; }  static String[] sanitizeString(String[] raw); static String sanitizeString(String raw); static String sanitizeString(String raw, boolean allowHTML); static int[] safeParseInt(String[] dirty); static int safeParseInt(String dirty); static long safeParseLong(String dirty); static float safeParseFloat(String dirty); static double safeParseDouble(String dirty); static String sanitizeDbColumnName(String dirty); static T sanitizeBeanStringProperties(T bean, Set<String> allowHtmlFields);  }