/ Published in: JavaScript
Expand |
Embed | Plain Text
function nl2br(str) { return str.replace(/\n/g, '<br />'); }
You need to login to post a comment.
iloveitaly on 05/26/09
html character new line break br newline literal
function nl2br(str) { return str.replace(/\n/g, '<br />'); }
You need to login to post a comment.