Java Utililty Methods HTML Unescape

List of utility methods to do HTML Unescape

Description

The list of methods to do HTML Unescape are organized into topic(s).

Method

StringunescapeHtmlByNumber(final String input)
Unescapes HTML characters based on ASCII numbers.
if (input.indexOf("&#") == -1)
    return input;
String out = "";
for (int i = 0, length = input.length(); i < length; i++) {
    if (input.charAt(i) == '&' && i + 1 < length && input.charAt(i + 1) == '#') {
        int j = i + 2;
        boolean isValid = true;
        int n = 0;
...
StringunEscapeHTMLTag(String input)
un Escape HTML Tag
if (input == null)
    return "";
input = input.trim().replaceAll("&amp;", "&");
input = input.replaceAll("&lt;", "<");
input = input.replaceAll("&gt;", ">");
input = input.replaceAll("<br>", "\n");
input = input.replaceAll("&#39;", "'");
input = input.replaceAll("&quot;", "\"");
...