67,549
社区成员




private static String htmlEncode(String text) {
if(text==null || "".equals(text))
return "";
text = text.replace("<", "<");
text = text.replace(">", ">");
text = text.replace(" ", " ");
text = text.replace("\"", """);
text = text.replace("\'", "'");
return text.replace("\n", "<br/>");
}
public static String textEncode(String text) {
if(text==null || "".equals(text))
return "";
text = text.replace("<", "<");
text = text.replace(">", ">");
text = text.replace(" ", " ");
text = text.replace(""", "\"");
text = text.replace("'", "\'");
return text.replace("<br/>", "\n");
}