WordPress.org

Support

Support » Plugins and Hacks » wp-Typography » [Plugin: wp-Typography] This plugin can cause errors in the head when wp_head writes link elements

[Plugin: wp-Typography] This plugin can cause errors in the head when wp_head writes link elements

  • This plugin can cause problems in the wp_head by adding html tags where they shouldn’t be. For example, this is some code I found in my wp_head, and I had to adjust the title of the post to remove an acronym because the plugin was putting a span around it.

    <link
    rel="alternate" type="application/rss+xml" title="What Is <span class="caps">SEO</span> Comments" href="http://techstudio.co/?feed=rss2&p=97" /></head><body
    class="body-class" id="loc-Mount Pleasant-SC">

    As you can see, the span tag in the title attribute breaks the code there.

    So this brings me to the suggestion, strip tags before passing the attritube to whatever code writes those link elements.

    http://wordpress.org/extend/plugins/wp-typography/

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have the same happening with <meta> Tags added by another plugin.
    <meta property="og:title" content="Multimeter <span class="caps">DT9205A</span>"/>
    The behaviour suggested above should be used in all <head> elements.

    It’s a pretty simple fix. Whatever function in WP writes these meta tags needs to strip HTML from the content attribute first. We should bring this bug to the right attention for a fix in the WP core. Any idea where we post that?

    Since these are the support forums, my guess is “here”.
    But I added a link to this thread as a comment to the plugin announcement on the authors site.

    My thought was that there might be a function in the WP core that writes meta tags for the head. If there is the content attribute may be passed as a variable. If that’s the case then that variable could have html stripped before writing the meta tag and this could all happen in the WP core. If so it would fix all the plugins that are causing this error all at once rather than plugin authors having to fix their plugins individually.

    I opened a ticket in WordPress Trac. If it’s something that can be solved at the core hopefully it will be done. Otherwise this thread can be brought to the attention of plugin authors for individual fixes.

    http://core.trac.wordpress.org/ticket/19117

    Unfortunately, that ticket was closed on basis of a wrong assumption. The current version of wp-typography is still treating meta content like front end text.

    Hopefully this FAQ will address your issue.

    No, it doesn’t. Thanks anyway.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: wp-Typography] This plugin can cause errors in the head when wp_head writes link elements’ is closed to new replies.
Skip to toolbar