Here you can find the source of escapeHTMLLine(String line)
public static String escapeHTMLLine(String line)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Iterator; public class Main { static HashMap escapeList = null; public static String escapeHTMLLine(String line) { if (escapeList == null) { init();/*from ww w . ja v a 2 s. com*/ } String key; for (Iterator var2 = escapeList.keySet().iterator(); var2 .hasNext(); line = line.replace(key, (String) escapeList.get(key))) { key = (String) var2.next(); } return line; } static void init() { escapeList = new HashMap(); escapeList.put(" ", " "); escapeList.put(""", "\""); escapeList.put("&", "&"); escapeList.put("<", "<"); escapeList.put(">", ">"); escapeList.put("¡", "!"); escapeList.put("©", "(c)"); escapeList.put("®", "(R)"); } }