Here you can find the source of htmlFilter(String value)
public static String htmlFilter(String value)
//package com.java2s; public class Main { public static String htmlFilter(String value) { if (value == null || value.length() == 0) { return " "; }/*from w w w. jav a2s . c o m*/ return value.replaceAll("&", "&").replaceAll("\t", " ").replaceAll(" ", " ") .replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """) .replaceAll("\n", "<br/>"); } }