Here you can find the source of filterHtml(String body)
public static String filterHtml(String body)
//package com.java2s; public class Main { public static String filterHtml(String body) { if (body == null) { return ""; }// www. ja va 2s .c o m body = body.replace(" ", " ").replace("\r", "<BR/>").replace("\n", "<BR/>").replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", """); return body; } }