@Test public void testBasicSanitizeString() { String script = "<script>foo</script>"; String html = "<table>"; script = WebSecurityUtils.sanitizeString(script); html = WebSecurityUtils.sanitizeString(html); assertTrue("Script is sanitized", script.equals("&lt;&#x73;cript&gt;foo&lt;/&#x73;cript&gt;")); assertTrue("Html is sanitized", html.equals("&lt;table&gt;")); }
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);  }