Here you can find the source of toHtmlInput(String str)
public static String toHtmlInput(String str)
//package com.java2s; public class Main { public static String toHtmlInput(String str) { if (str == null) return ""; String html = new String(str); // html = html.replaceAll("&", "&"); html = html.replaceAll("<", "<"); html = html.replaceAll(">", ">"); // html = html.replaceAll("\"", """); return html; }/*ww w . j a v a 2 s . c o m*/ }