Java HTML Unescape unEscapeHTMLTag(String input)

Here you can find the source of unEscapeHTMLTag(String input)

Description

un Escape HTML Tag

License

Apache License

Declaration

public static final String unEscapeHTMLTag(String input) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static final String unEscapeHTMLTag(String input) {
        if (input == null)
            return "";
        input = input.trim().replaceAll("&", "&");
        input = input.replaceAll("&lt;", "<");
        input = input.replaceAll("&gt;", ">");
        input = input.replaceAll("<br>", "\n");
        input = input.replaceAll("&#39;", "'");
        input = input.replaceAll("&quot;", "\"");
        input = input.replaceAll("&#92;", "\\\\");
        return input;
    }/*from www . j  a  v a  2s.c  om*/
}

Related

  1. unescapeHTML(String value)
  2. unescapeHTML(String value)
  3. unescapeHTML2(String source, int start)
  4. unescapeHtmlByName(final String input)
  5. unescapeHtmlByNumber(final String input)