function removeCC(s) {
/* Remove NewLine, Carriage Return and Tab characters from a String */
r = ""; for (i=0; i < s.length; i++) { if (s.charAt(i) != '\n' && s.charAt(i) != '\r' && s.charAt(i) != '\t') { r += s.charAt(i); } } return r; }
Same thing with regular expression
function removeCC(s){ return s.replace(/[\n\r\t]/g," "); }