I am looking for a safe, injection-free way to let users enter text into textareas, including line-breaks, and preserving the line-breaks when rendering the text as HTML output.
The straightforward approach would be to replace any \n by ,treat the result as HTML and sanitize it to remove any unwanted tags. But I am wondering if there is a package out there that automates this in a neat helper?