Java HTML Decode htmlDecode(String strSrc)

Here you can find the source of htmlDecode(String strSrc)

Description

html Decode

License

Open Source License

Declaration

public static String htmlDecode(String strSrc) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String htmlDecode(String strSrc) {
        if (strSrc == null) {
            return "";
        }/*  w w  w . j a  va 2s . co m*/
        strSrc = strSrc.replaceAll("&lt;", "<");
        strSrc = strSrc.replaceAll("&gt;", ">");
        strSrc = strSrc.replaceAll("&quot;", "\"");
        strSrc = strSrc.replaceAll("&#039;", "'");
        strSrc = strSrc.replaceAll("&amp;", "&");
        return strSrc;
    }
}

Related

  1. HTMLDecode(String s)
  2. htmlDecode(String s)
  3. htmlDecoder(String content)
  4. htmlEntityDecode(String s)
  5. htmlEntityDecodeSingle(String s)
  6. toHtmlString(String src, boolean noSingleQuotes)