Here you can find the source of getHtmlStrCnvr(String srcString)
public static String getHtmlStrCnvr(String srcString)
//package com.java2s; public class Main { public static String getHtmlStrCnvr(String srcString) { String tmpString = srcString; try {/* w ww. j av a 2 s . co m*/ tmpString = tmpString.replaceAll("<", "<"); tmpString = tmpString.replaceAll(">", ">"); tmpString = tmpString.replaceAll("&", "&"); tmpString = tmpString.replaceAll(" ", " "); tmpString = tmpString.replaceAll("'", "\'"); tmpString = tmpString.replaceAll(""", "\""); } catch (Exception ex) { ex.printStackTrace(); } return tmpString; } }