package utils;

public class Filter {
	public static String xss(String input){
		input=input.replaceAll("</", " ");
		input = input.replaceAll("/>", " "); 
		input=input.replaceAll("<", " ");
		input = input.replaceAll(">", " "); 
		return input;
	}
}


package utils;

public class Filter {
	public static String xss(String input) {
		// Some fields are optional so allow for null here
		if (input == null)
			return input;

		input = input.replaceAll("</", " ");
		input = input.replaceAll("/>", " "); 
		input = input.replaceAll("<", " ");
		input = input.replaceAll(">", " "); 
		return input;
	}
}


Fix nullptr exception when input to filter is null