Here you can find the source of unescapeText(String s)
public static String unescapeText(String s)
//package com.java2s; /*//from w w w . j av a 2 s .c om * GWT Portlets Framework (http://code.google.com/p/gwtportlets/) * Copyright 2009 Business Systems Group (Africa) * * This file is part of GWT Portlets. * * GWT Portlets is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GWT Portlets is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with GWT Portlets. If not, see <http://www.gnu.org/licenses/>. */ public class Main { public static final String quote = """; public static final String amp = "&"; public static final String gt = ">"; public static final String lt = "<"; /** * Unescapes character sequences such as '&lt;', '&amp;' etc. to '<', '&' etc * Note: An argument such as '&amp;lt;' will result in '&lt;' */ public static String unescapeText(String s) { if (s == null) { return null; } return s.replace(lt, "<").replace(gt, ">").replace(quote, "\"") .replace(amp, "&"); } }