• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Breadcrumbs showing html markup for superscript – want to hide html

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Breadcrumbs showing html markup for superscript – want to hide html

This topic is: resolved

Tagged: breadcrumbs

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 3 months ago by Badlywired.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 13, 2015 at 11:03 am #137327
    csbeck
    Member

    I've got a site under development:

    When going to this page, the breadcrumb shows the HTML markup for making the registered mark superscripted:

    It's strange because when the breadcrumb is not a link, the title looks correct (without the HTML markup).

    Does anyone know how to make the breadcrumb links appear without the HTML markup?

    Thanks!

    http://cortera.beckerstudio.com/products/ecredit/ecredit-enterprise-credit
    January 14, 2015 at 4:40 pm #137490
    csbeck
    Member

    Checking again to see if anyone has an ideas about this.

    January 15, 2015 at 8:01 am #137529
    Badlywired
    Member

    Adding this to your functions.php should do it

    // filter to allow <sup> 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()));
        }

    Obviously use at your own risk.

    Detailed explanation of your issue here -> http://badlywired.com/2015/genesis-breadcrumbs-markup/


    My techy blog WordPress and stuff badlywired.com

    January 15, 2015 at 10:23 am #137555
    Badlywired
    Member

    p.s. I also raised this with StudioPress and they gave two other work arounds
    ......................... this is what they say --------

    For now, another workaround you are welcome to use that filters Genesis breadcrumb links only and not esc_html throughout WordPress is this:

    add_filter( 'genesis_breadcrumb_link', 'sp_html_crumbs', 10, 4 );
    function sp_html_crumbs( $link, $url, $title, $content ) {
    	$link = sprintf( '<a href="%s"%s>%s</a>', esc_attr( $url ), $title, $content );
    	return $link;
    }

    If you prefer, you can also solve the issue without writing code by installing the WordPress SEO plugin and activating breadcrumbs under SEO > Internal Links (http://d.pr/i/19y2Y ). This works because WordPress SEO doesn't escape HTML in breadcrumb links by default like Genesis does. (That may change in the future, though.)


    My techy blog WordPress and stuff badlywired.com

    January 15, 2015 at 10:32 am #137556
    csbeck
    Member

    That did it. Thanks so much Badlywired.
    So can you imagine any way that it would "harm" a site? Checked the site and everything seems ok - for now.
    Thanks again!

    January 15, 2015 at 11:06 am #137560
    Badlywired
    Member

    I can't think of anyway. But it is altering the behaviour of esc_html across the site (unless you use StudioPresses version), so there is a REMOTE chance that some HTML slips through that shouldn't somewhere and your site formatting gets screwed up, so hence not accepting any liability 🙂


    My techy blog WordPress and stuff badlywired.com

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble