In PHP, we can convert a line break to a <br/>
through the function nl2br
.
What about JavaScript? How can I do this in a secure way?
I decided to ask the question because I do not know if a simple replace("\n")
fits all cases of line break.