code: public static String escapeJS(String str, char quotesUsed) {
  	return escapeJS(str, quotesUsed, (CharsetEncoder) null);
      }
docs: escapes JS sensitive characters
  
  @param str String to escape
  @return escapes String