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

  1. tomdkat
    Posted 3 years 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:


    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:

    (See answer #2)


    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!



  2. riversatile
    Posted 3 years ago #


    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
    Posted 3 years 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


No tags yet.