Escaping jquery update div
<p>I have a <code>&lt;p&gt;</code> tag that updates on <code>.keyup</code> from a textarea.</p>

<pre><code>$("textarea").keyup(function(e) {
            var newtext = $("textarea").val().replace(/\n/g,'&lt;br/&gt;');
            $("p").html(newtext);

        });
</code></pre>

<p>How do I escape javascript that a user enters.</p>

<p>I don't want to escape the html just the javascript.</p>
