JQuery change new line to line break in TEXTAREA
<p>I've been trying to change the new lines to line breaks in the <code>&lt;TEXTAREA&gt;</code>  but I'm failing to do so ...</p>

<p>I want to do this cause I take the value and append it to another <code>&lt;TEXTAREA&gt;</code> that is copied later on to the clipboard. When I copy to the clipboard, everything is set to a single line due to the <code>new line</code> in the <code>&lt;textarea&gt;</code></p>

<p>Here is my code:</p>

<pre><code>if(oInput.get(0).tagName == "TEXTAREA")
{
    temp = oInput.val();
    temp = temp.replace(/([^&gt;\r\n]?)(\r\n|\n\r|\r|\n)/g, '&lt;br /&gt;');
oInput.val() = temp.val();
}
</code></pre>
