How do I find and replace HTML entities with jQuery?
<p>I've constructed a calendar template for a Drupal site using an HTML table, and I've got jQuery to add a class 'no-text' to each empty cell: </p>

<pre><code>$('table.calendar td:empty').addClass('no-text');
</code></pre>

<p>This works well, but my problem is that the CMS WYSIWYG editor automatically adds the HTML entity <code>&amp;nbsp;</code> to empty cells. I've therefore attempted to find and replace the entities with a 'real' space beforehand, but jQuery fails to find them:</p>

<pre><code>$('table.calendar td').each(function() {
   var $this = $(this);
   var t = $this.text();
   $this.text(t.replace('[entity here]',''));
});
</code></pre>

<p>This snippet works fine when replacing a normal string, but the <code>&amp;nbsp;</code> seems to be something different!</p>

<p>So my question is this: how can jQuery be used to search and replace HTML entities?</p>
