Here you can find the source of encodeEntities(String content)
public static String encodeEntities(String content)
//package com.java2s; public class Main { public static String encodeEntities(String content) { content = content.replace("&", "&"); content = content.replace("<", "<"); content = content.replace(">", ">"); content = content.replace("\"", """); content = content.replace("'", "'"); return content; }//w ww .jav a 2 s .c o m }