Issue with regex when I mix razor and JS and use <text> </text>
<p>This question is an epilogue of the great question <a href="https://stackoverflow.com/questions/5614941/mix-razor-and-javascript-code">Mix Razor and Javascript code</a> where I learn about this syntax:</p>

<pre><code>@if (foo)
{
    // C# code
    &lt;text&gt;
    // JS Code
    &lt;/text&gt;
}
</code></pre>

<p>It worked well, until today, when I used a JS regex inside the <code>&lt;text&gt;&lt;/text&gt;</code> :</p>

<pre><code>$('#bar').html(boo.replace(/&lt;br([\/ ]*)&gt;/g, "\r\n"));
</code></pre>

<p>Which throw a yellow page telling me that there was an issue with <code>br(</code> which can't be analyzed.</p>

<p>Is there an inline way to deal with it?</p>