title: Replace \n with <br> and \r\n with <p> in javascript
body: <p>I need JS that will remove any HTML tags, and then replace newlines with <code>&lt;/p&gt;&lt;p&gt;</code> and line breaks with <code>&lt;br/&gt;</code>. The string value is coming from a textarea and I understand Linux, Mac and Windows all format newlines differently so I need to take that into account. Thanks!</p>