Android examples for java.lang:String Escape
Unescape Html String
import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.net.URLEncoder; import java.security.SecureRandom; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Locale; public class Main{ public static String getHtmlStrCnvr(String srcString) { String tmpString = srcString; try {//from ww w . j a va 2 s .com 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; } }