I'm using a plugin that is generating some additional markup that needs to be removed. I can detect if the HTML entity
exists in a specific element, but I cannot seem to change it using html().
Can anyone spot the issue that's preventing the element from being changed?
HTML
<div class="quote">
<blockquote>John Doe wrote:
<p></p>
<blockquote>
<p>Jane Doe wrote: This is awesome!</p>
</blockquote>
</blockquote>
<p> </p>
</div>
jQuery
if ($('.quote').find('p:contains(" ")')) {
console.log(' detected');
$('.quote').find('p:contains(" ")').html("inserted text");
}