Javascript String stripNewlines()
stripNewlines()
String.prototype.stripNewlines = function() { return this.replace(/\r?\n|\r/g, ''); };
String.prototype.stripNewlines = function() { return this.replace(/[\n\r]/g,""); }