List of utility methods to do HTML Unescape
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 source) Returns the provided string where all HTML special characters (e.g. StringBuilder sb = new StringBuilder(source.length()); int start = -1, end = -1; int last = 0; start = source.indexOf("&"); end = source.indexOf(";", start); while (start > -1 && end > start) { String encoded = source.substring(start, end + 1); String decoded = HTML_CODES.get(encoded); ... |
String | unescapeHTML(String source) unescape HTML int i, j; boolean continueLoop; int skip = 0; do { continueLoop = false; i = source.indexOf("&", skip); if (i > -1) { j = source.indexOf(";", i); ... |
String | unescapeHTML(String source, int start) unescape HTML int i, j; i = source.indexOf("&", start); while (i > -1) { j = source.indexOf(";", i); if (j > i) { String entityToLookFor = source.substring(i, j + 1); String value = htmlEntities.get(entityToLookFor); if (value != null) { ... |
String | unescapeHTML(String str) escapes the 5 special html chars - see http://www.w3schools.com/tags/ref_entities.asp if (str == null) return null; str = str.replace("&", "&"); str = str.replace("'", "'"); str = str.replace(""", "\""); str = str.replace("<", "<"); str = str.replace(">", ">"); str = str.replace("\u0095", "."); ... |
String | unEscapeHtml(String text) Unescapes a string containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes. if (text == null || text.length() == 0) { return ""; String result = text; result = result.replace("<", "<"); result = result.replace(">", ">"); result = result.replace("&", "&"); result = result.replace(""", "\""); ... |
String | unescapeHTML(String value) unescape HTML if (value == null) return null; if (value.indexOf('&') < 0) return value; Map<String, Character> ent = getHtmlEntities(); StringBuffer sb = new StringBuffer(); final int length = value.length(); for (int i = 0; i < length; i++) { ... |
String | unescapeHTML(String value) unescape HTML return replaceStrings(value, specialHtmlEscapes, specialHtmlChars);
|
String | unescapeHTML2(String source, int start) unescape HTML int i, j; i = source.indexOf("&", start); if (i > -1) { j = source.indexOf(";", i); if (j > i) { String entityToLookFor = source.substring(i, j + 1); String value = htmlEntities.get(entityToLookFor); if (value != null) { ... |
String | unescapeHtmlByName(final String input) Unescapes HTML characters based on it name (value). String result = input; for (int i = 0; i < BASIC_HTML_ESCAPE.length; i++) { result = replace(result, BASIC_HTML_ESCAPE[i][1], BASIC_HTML_ESCAPE[i][0]); return result; |