@Override public String getHeader(String name) { String value = super.getHeader(name); if (value == null) { return value; } return AntiSamyScanner.cleanHTML(value); }
private Map<String, String[]> cleanParameterMap() { if (parameterMap == null) { return parameterMap; } Map<String, String[]> cleanMap = new HashMap<String, String[]>(); for (String key : parameterMap.keySet()) { String[] values = parameterMap.get(key); String[] cleanValues = new String[values.length]; for (int i = 0; i < values.length; i++) { String value = values[i]; cleanValues[i] = AntiSamyScanner.cleanHTML(value); } cleanMap.put(key, cleanValues); } return cleanMap; }