I have a simple script that is looking for a heading to perform a function when the heading matched. I am running into issues with special characters like copyright and registered trademarks.
var isDisclosure = $('.disclosure-container h3').html();
if ( isDisclosure == "Awesome Product<sup>®</sup> Disclosures" ) {
alert('zomg');
}
The html looks like this in firebug:
<h3 class="inline">
Awesome Product
<sup>®</sup>
Disclosures
</h3>
Upon viewing the source the html looks like this...
<h3 class="inline">Awesome Product<sup>®</sup> Disclosures</h3>
So when I add that html to the if statement, I get an added extra character and it doesn't work... like so...
if ( isDisclosure == "Awesome Product<sup>©</sup> Disclosures" )
I am very open to just searching for "Awesome Product" with a wildcard or something at the end.