Here you can find the source of htmlEscapeBasicMarkup(final String text)
public static String htmlEscapeBasicMarkup(final String text)
//package com.java2s; //License from project: LGPL public class Main { /**/*from ww w . jav a 2s . c om*/ * Performs necessary escaping to render arbitrary plain text as plain text * without any markup. */ public static String htmlEscapeBasicMarkup(final String text) { final StringBuilder buf = new StringBuilder(text.length() + 64); for (int i = 0; i < text.length(); i++) { final char ch = text.charAt(i); switch (ch) { case '<': buf.append("<"); break; case '&': buf.append("&"); break; case '>': buf.append(">"); break; default: buf.append(ch); break; } } return buf.toString(); } }