WordPress.org

Ready to get started?Download WordPress

Forums

SEO Smart Links
Problem with SEO Smart Links and HTML element attributes (3 posts)

  1. tomdkat
    Member
    Posted 1 year ago #

    I recently encountered a problem involving SEO Smart Links where it's adding escape characters to double quotes as part of the prevention of links in heading elements. This issue has been reported here:

    http://wordpress.org/support/topic/html-error-in-link
    http://wordpress.org/support/topic/plugin-seo-smart-links-problems-with-headings
    http://wordpress.org/support/topic/cant-align-h1-text-on-center

    Now, I realize turning off the "prevent linking in heading tags" option can prevent the problem from happening, but I'm not sure this is what I want to do.

    Some web research turned up these pages:

    http://stackoverflow.com/questions/2060776/remove-escaped-quotes-from-wordpress-posts
    (See answer #2)

    http://www.prelovac.com/vladimir/forum/plugins/seo-smart-links-fix-for-you-seo-smart-links-plugin

    The reason I'm starting this thread is because I don't want to modify the plugin source code only to have those changes removed with the next plugin upgrade/update.

    My questions are:

    1) Do the above code changes make sense?
    2) If they do, is there a chance to get them implemented in a future release of SEO Smart Links?
    3) Is it possible to update the plugin to more accurately detect a anchor element inside a heading element and make the appropriate adjustment to the generated HTML?

    What I need to code is:

    <h3 id="special">Heading text</h3>

    I'm not wanting to code this:

    <h3>Heading text</h3>

    Since the H3 element without the embedded anchor doesn't have the anchor, the quotes in the "id" attribute shouldn't be touched.

    Thanks in advance for your time and assistance!

    Peace...

    http://wordpress.org/extend/plugins/seo-automatic-links/

  2. riversatile
    Member
    Posted 1 year ago #

    Hi,

    I encountered the same issue with :
    The code :
    <h2 id="something">Something</h2>
    becomes like that :
    <h2 id="\"something\"">Something</h2>
    instead of
    <h2 id="something">Something</h2>

    This makes my link :
    <a href="http://my-web-site/#something">Something</a>
    broken !

  3. riversatile
    Member
    Posted 1 year ago #

    The issue is caused between the lines 107 and 108.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.