Java tutorial
//package com.java2s; public class Main { public static String htmldecode(String str) { str = str.replace("&", "&"); str = str.replace(" ", " "); str = str.replace(""", "\""); str = str.replace("'", "'"); str = str.replace("<", "<"); str = str.replace(">", ">"); str = str.replace("<br[^>]*>(?:(rn)|r|n)?", "n"); return str; } }