Java String Unescape unescape(final String source)

Here you can find the source of unescape(final String source)

Description

unescape

License

Open Source License

Declaration

public static String unescape(final String source) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String unescape(final String source) {
        if (source == null) {
            return null;
        }//from   w  ww.ja  va2 s  . com
        String result = source;
        result = result.replaceAll("&", "&");
        result = result.replaceAll(""", "\"");
        result = result.replaceAll("'", "\'");
        result = result.replaceAll("&lt;", "<");
        result = result.replaceAll("&gt;", ">");
        return result;
    }
}

Related

  1. unescape(final CharSequence target)
  2. unescape(final String aSpecification)
  3. unescape(final String input)
  4. unescape(final String name)
  5. unescape(final String s)
  6. unescape(final String str, final char escapeChar)
  7. unescape(final String string, final char quoteChar)
  8. unescape(final String text)
  9. unescape(final String[] inval, final Character escapeChar)