WordPress.org

Ready to get started?Download WordPress

Forums

wp-Typography
This plugin can cause errors in the head when wp_head writes link elements (9 posts)

  1. TechStudio
    Member
    Posted 2 years ago #

    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/

  2. GeraldS
    Member
    Posted 2 years ago #

    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.

  3. TechStudio
    Member
    Posted 2 years ago #

    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?

  4. GeraldS
    Member
    Posted 2 years ago #

    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.

  5. TechStudio
    Member
    Posted 2 years ago #

    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.

  6. TechStudio
    Member
    Posted 2 years ago #

    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

  7. Andreas Beer
    Member
    Posted 2 years ago #

    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.

  8. kingjeffrey
    Member
    Plugin Author

    Posted 2 years ago #

    Hopefully this FAQ will address your issue.

  9. GeraldS
    Member
    Posted 2 years ago #

    No, it doesn't. Thanks anyway.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic