Here you can find the source of sanitizeJavascript(String originalString)
public static String sanitizeJavascript(String originalString)
//package com.java2s; //License from project: Open Source License public class Main { public static String sanitizeJavascript(String originalString) { return originalString.replaceAll("[\\\\(\"\')\\]\\[]", "\\\\$0"); }//w ww .ja v a 2 s . c o m }