how can I do a jQuery swear word / bad word filter?
<p>I know there are many arguments as to why this is a bad idea, but in my implementation I'm planning on enabling/disabling bad words in the account settings.  In other words, bad words will be visible by default, but switched off / hidden if asked.</p>

<p>The plan will be to send a JSON string to the client and let the client filter out the bad words.</p>

<p>json string</p>

<pre><code>['swear1', 'swear2']
</code></pre>

<p>original phrase</p>

<pre><code>this phrase includes swear1
</code></pre>

<p>final output</p>

<pre><code>this phrase includes ****
</code></pre>

<p>this is what I've tried so far</p>

<pre><code>    $(document).ready (function () {
        $('body').html().replace('asdf', 'ffff');
    });
</code></pre>

<p>now on a side note, I am using asp.net mvc and I "could" do this on the server side, but I was thinking that this would be better if offloaded to the client... I'm open to suggestions on this.</p>
