Turning on BBCODES - Javascript
<p>I'm using this chat <a href="http://tutorialzine.com/2010/10/ajax-web-chat-php-mysql/" rel="nofollow">http://tutorialzine.com/2010/10/ajax-web-chat-php-mysql/</a> and I tried to turn on the bbcodes but: <a href="http://imageshack.us/photo/my-images/827/bbcodes1.png/" rel="nofollow">http://imageshack.us/photo/my-images/827/bbcodes1.png/</a></p>

<p>I tried to replace in</p>

<p>scripts.js</p>

<pre><code> text       : text.replace(/&lt;/g,'&amp;lt;').replace(/&gt;/g,'&amp;gt;')
</code></pre>

<p>with</p>

<pre><code>text        : text.replace(/&lt;/g,'&amp;lt;').
                                replace(/&gt;/g,'&amp;gt;').
                                replace(/\[b\]((\s|.)+?)\[\/b\]/,'&lt;b&gt;\\1&lt;/b&gt;')
</code></pre>
