Ahh… I see the problem, the_title()
is being used in your permalink as well.
That common usage was one reason that some version of WordPress introduced the_title_attribute()
. It produces a clean version of the title, suitable for using in an attribute.
You’ve got code in your theme that looks pretty similar to this:
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
Change it to this:
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
The difference is using the_title_attribute
instead of the_title
inside the link’s title attribute. Note that this is how the default theme does it as well.
You may need to change more than one theme file. Probably index.php and single.php, at minimum. Look for any other uses of “the_title” in your theme and adjust them accordingly.