private static String escape(String v) { if (v == null) return null; v = TNEFUtils.replace(v, "\r\n", "\\n"); v = TNEFUtils.replace(v, "\n", "\\n"); v = TNEFUtils.replace(v, ",", "\\,"); v = TNEFUtils.replace(v, ";", "\\;"); return v; }
private static String clear(String v, boolean escape) { // escape the value if (escape) v = escape(v); if (v != null) { // escape line breaks within value v = TNEFUtils.replace(v, "\r\n", "\\n"); v = TNEFUtils.replace(v, "\n", "\\n"); } return v; }