Remove duplicated text using jquery
<p>say I have the following</p>

<pre><code> &lt;h3&gt;This is my heading&lt;/h3&gt;
 &lt;p&gt;This is my headingAnd this is part of a paragraph&lt;/p&gt;
</code></pre>

<p>I want to end up with the following</p>

<pre><code> &lt;h3&gt;This is my heading&lt;/h3&gt;
 &lt;p&gt;And this is part of a paragraph...&lt;/p&gt;
</code></pre>

<p>I found this code</p>

<pre><code>   $(function() {
   var seen = {};
    $('p, h3').each(function() {
    var txt = $(this).text();
     if (seen[txt])
     $(this).remove();
   else
     seen[txt] = true;
  });
});
</code></pre>

<p>but because there are two words joined in the paragraph it won't work. The data is being pulled dynamically from a rss feed.</p>

<p>Thanks in advance</p>
