Here you can find the source of sanitize(String html)
public static String sanitize(String html)
//package com.java2s; //License from project: Apache License public class Main { public static String[] sanitizeSrc = { "&", "<", ">", "\"", "'" }; public static String[] sanitizeDesc = { "&", "<", ">", """, "'" }; public static String sanitize(String html) { if (html == null || html.isEmpty()) { return html; }/* w w w. j ava2 s . com*/ for (int i = 0; i < sanitizeSrc.length; i++) { html = html.replace(sanitizeSrc[i], sanitizeDesc[i]); } return html; } }