Java HTML Unescape unescapeHtml(String s)

Here you can find the source of unescapeHtml(String s)

Description

unescape Html

License

Open Source License

Declaration

public static String unescapeHtml(String s) 

Method Source Code

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

public class Main {
    public static String unescapeHtml(String s) {
        if (s == null || s.indexOf('&') == -1)
            return s;

        s = s.replace("&lt;", "<");
        s = s.replace("&gt;", ">");
        s = s.replace("&quot;", "\"");
        s = s.replace("&#39;", "'");
        s = s.replace("&amp;", "&");

        return s;
    }/* w w  w .  j a  va2 s  . c  o m*/
}

Related

  1. unEscapeHTML(final String escapedHTML)
  2. unescapeHtml(final String input)
  3. unescapeHTML(String comment)
  4. unescapeHTML(String html)
  5. unescapeHtml(String s)
  6. unescapeHTML(String s)
  7. unescapeHTML(String s)
  8. unescapeHTML(String s)
  9. unescapeHTML(String source)