How can I replace HTML <BR> <BR/> or <BR /> with new line character " "
<BR> <BR/> or <BR />
You're looking for an equivilent of PHP's nl2br(). This should do the job:
nl2br()
function br2nl(str) { return str.replace(/<brs*/?>/mg," "); }
2.1m questions
2.1m answers
60 comments
57.0k users