Trying to translate a carriage return into a <br /> html tag in Javascript?
<p>I have an XML feed that im pulling via javascript and translating it into something more HTML friendly, but im caught up on how to translate carriage returns into an html br tag</p>

<p>I tried something like this                         </p>

<pre><code>text = text.replace('\r','&lt;br /&gt;'); 
</code></pre>

<p>to no avail..</p>

<p>Any ideas?</p>
