Here you can find the source of filterHtml(String s)
public static String filterHtml(String s)
//package com.java2s; //License from project: Apache License public class Main { public static String filterHtml(String s) { if (s == null) { return null; }/* ww w.j a v a 2 s .c o m*/ s = s.replaceAll("<", ""); s = s.replaceAll(">", ""); s = s.replaceAll(" ", ""); s = s.replaceAll("(?s)<!--.*?-->", ""); return s.replaceAll("(?s)<.*?>", ""); } }