Node.js examples for String:HTML String
Convert new line letter to <br> using replace method
String.prototype.nl2br = function() { return String(this).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br />$2'); }