Android HTML String Unescape getHtmlStrCnvr(String srcString)

Here you can find the source of getHtmlStrCnvr(String srcString)

Description

get Html Str Cnvr

Declaration

public static String getHtmlStrCnvr(String srcString) 

Method Source Code

//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("&lt;", "<");
            tmpString = tmpString.replaceAll("&gt;", ">");
            tmpString = tmpString.replaceAll("&amp;", "&");
            tmpString = tmpString.replaceAll("&nbsp;", " ");
            tmpString = tmpString.replaceAll("&apos;", "\'");
            tmpString = tmpString.replaceAll("&quot;", "\"");
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        return tmpString;

    }
}

Related

  1. getHtmlStrCnvrNew(String srcString)