Here you can find the source of unEscapeHTML(final String escapedHTML)
Parameter | Description |
---|---|
escapedHTML | The original string |
public static String unEscapeHTML(final String escapedHTML)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { /**//from w ww . j a v a 2s.c o m * Replace HTML escape sequences with the correct characters * * @param escapedHTML The original string * @return The result, after substitution */ public static String unEscapeHTML(final String escapedHTML) { String retVal = escapedHTML; retVal = retVal.replaceAll(">", ">"); retVal = retVal.replaceAll("<", "<"); retVal = retVal.replaceAll("&", "&"); retVal = retVal.replaceAll(" ", " "); return retVal; } }