-public class HTMLRoutines {
- public static String encodeHTML(String aText) {
- final char[] CHARACTERS_TO_ESCAPE = { '&', '<', '>', '"', '\'' };
- final String[] ESCAPE_CODES = { "&", "<", ">", """, "'" };
-
- int position, nextPosition;
- int i;
- StringBuffer result = new StringBuffer();