Here you can find the source of htmlUnescape(String safeHtml)
public static String htmlUnescape(String safeHtml)
//package com.java2s; //License from project: Open Source License public class Main { public static String htmlUnescape(String safeHtml) { if (safeHtml == null) return null; if (safeHtml.indexOf("<") != -1) { safeHtml = safeHtml.replace("<", "<"); }/*from ww w .j a v a 2s.c o m*/ if (safeHtml.indexOf(">") != -1) { safeHtml = safeHtml.replace(">", ">"); } if (safeHtml.indexOf(""") != -1) { safeHtml = safeHtml.replace(""", "\""); } if (safeHtml.indexOf("'") != -1) { safeHtml = safeHtml.replace("'", "'"); } if (safeHtml.indexOf("&") != -1) { safeHtml = safeHtml.replace("&", "&"); } return safeHtml; } }