I’ve been working on a site where they have registered marks (®) for their product names, which are also used as page titles and are therefore shown in the menus and breadcrumbs. I use Genesis, a premiere WordPress theme and template system. They have some area in their code that makes the html markup show in the breadcrumb links. So in my breadcrumb paths, I had the following:
The breadcrumb shows correctly when I’m on the particular product page – Home | Products | This Product®
But when I’m on a child page for that product, the breadcrumb looked like this – Home | Products | This Product<sup>®</sup> | Child Product®
StudioPress Forum to the rescue! Badlywired answered my plea. He gave me a link to this page which provided the answer – though has given warning to double check a site’s functionality because it disables a functionality in the Genesis framework – I have yet to see any negative for using it.
Basically, just add this code to the functions.php file:
// filter to allow tag through esc_html
add_filter('esc_html', 'bw_esc_html',10,2);
function bw_esc_html($val, $text, $content = null)
{
$text = wp_check_invalid_utf8( $text );
return wp_kses($text, array ( 'sup' => array()));
}