List of utility methods to do HTML Unescape
String | htmlUnescape(String s) Turn HTML character references into their plain text UNICODE equivalent. if (s == null) { return null; StringBuffer unescaped = new StringBuffer(s.length()); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == '&') { int start = Math.min(i + 1, s.length() - 1); ... |
String | htmlUnescape(String source) Reverses htmlEscape. StringBuffer buf = new StringBuffer(); if (source != null) { for (int i = 0; i < source.length(); ++i) { char ch = source.charAt(i); if (ch == '&') { int semi = source.indexOf(';', i + 1); if (semi == -1) { buf.append(ch); ... |
String | unEscapeHTML(final String escapedHTML) Replace HTML escape sequences with the correct characters String retVal = escapedHTML; retVal = retVal.replaceAll(">", ">"); retVal = retVal.replaceAll("<", "<"); retVal = retVal.replaceAll("&", "&"); retVal = retVal.replaceAll(" ", " "); return retVal; |
String | unescapeHtml(final String input) Unescapes HTML characters from the input. String unescapeHexHtmlOutput = unescapeHtmlByNumber(input);
return unescapeHtmlByName(unescapeHexHtmlOutput);
|
String | unescapeHTML(String comment) unescape HTML int length = comment.length(); StringBuffer buffer = new StringBuffer(); for (int i = 0; i < length; ++i) { String comp = comment.substring(i, i + 1); if (" ".compareTo(comp) == 0) { comp = comment.substring(++i, i + 1); buffer.append(" "); } else if ("\r".compareTo(comp) == 0) { ... |
String | unescapeHTML(String html) Given escaped html characters, unescapes them. return html.replace("'", "'").replace(""", "\"").replace(">", ">").replace("<", "<") .replace("&", "&"); |
String | unescapeHtml(String s) unescape Html if (s == null || s.indexOf('&') == -1) return s; s = s.replace("<", "<"); s = s.replace(">", ">"); s = s.replace(""", "\""); s = s.replace("'", "'"); s = s.replace("&", "&"); return s; ... |
String | unescapeHTML(String s) Turn any HTML escape entities in the string into characters and return the resulting string. StringBuffer result = new StringBuffer(s.length()); int ampInd = s.indexOf("&"); int lastEnd = 0; while (ampInd >= 0) { int nextAmp = s.indexOf("&", ampInd + 1); int nextSemi = s.indexOf(";", ampInd + 1); if (nextSemi != -1 && (nextAmp == -1 || nextSemi < nextAmp)) { int value = -1; ... |
String | unescapeHtml(String s) Reverses the escaping done by escapeForHtml. final int sLength = s.length(); final StringBuilder result = new StringBuilder(sLength); for (int i = 0; i < sLength; ++i) { final char ch = s.charAt(i); if (ch == '&') { if (s.startsWith("&", i)) { result.append('&'); i += 4; ... |
String | unescapeHTML(String s) unescape HTML String[][] escape = { { "<", "<" }, { ">", ">" }, { "&", "&" }, { """, "\"" }, { "à", "\u00e0" }, { "À", "\u00c0" }, { "â", "\u00e2" }, { "ä", "\u00e4" }, { "Ä", "\u00c4" }, { "Â", "\u00c2" }, { "å", "\u00e5" }, { "Å", "\u00c5" }, { "æ", "\u00e6" }, { "Æ", "\u00c6" }, { "ç", "\u00e7" }, { "Ç", "\u00c7" }, { "é", "\u00e9" }, { "É", "\u00c9" }, { "è", "\u00e8" }, { "È", "\u00c8" }, { "ê", "\u00ea" }, { "Ê", "\u00ca" }, { "ë", "\u00eb" }, { "Ë", "\u00cb" }, { "ï", "\u00ef" }, { "Ï", "\u00cf" }, { "ô", "\u00f4" }, { "Ô", "\u00d4" }, { "ö", "\u00f6" }, ... |