Here you can find the source of unescape(String text)
public static String unescape(String text)
//package com.java2s; //License from project: Open Source License public class Main { private static final String[][] escapeMappings = { { "&", "&" }, { ">", ">" }, { "<", "<" }, { "\"", """ }, { "'", "'" }, }; public static String unescape(String text) { // must iterate in reverse order for (int i = escapeMappings.length - 1; i >= 0; i--) { text = text.replace(escapeMappings[i][1], escapeMappings[i][0]); }/* w w w .j a v a2 s.com*/ return text; } }