Forums

[Plugin: SEO Smart Links] Custom keywords break existing <a> tags (4 posts)

  1. archon810
    Member
    Posted 2 years ago #

    Hi Vladimir,

    I found a problem where if I have an existing link, say <a href=''>This is some test string</a> and I add a custom keyword 'is some' that points to some url, your plugin will try to rewrite the original link, even though it's already within the <a> tag.

    The final text will be something like <a href=''>This </a><a href='whateverurl'>is some</a> test string.

    The problem is not only that it rewrite part of the link - that would be undesirable but still working but the rest of the link - the string "test string" is now no longer linked at all - just text.

    The problem currently manifests itself on this page, for example: http://www.androidpolice.com/2010/03/29/upgrade-your-android-phones-external-storage-with-a-data-turbo-16gb-class-6-microsd-card-review-and-benchmarks/

    Here's a screen shot: http://i.imgur.com/lwTU1.png - "HTC Hero" is one of the keywords I added to the plugin. All text after it is no longer a link.

    Thank you for looking into it and feel free to contact me any time

    Artem
    http://twitter.com/ArtemR

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

  2. Vladimir Prelovac
    Member
    Posted 1 year ago #

    Finally fixed this, will be featured in a next version.

  3. archon810
    Member
    Posted 1 year ago #

    Thanks :]

    I actually had a related bug, which was much nastier. I don't remember exact specifics but it had to do with square brackets [] being in the alt or title params of an hyperlinked image, and if one of custom keywords was also part of the alt/title. The mayhem produced by this spews out half-broken HTML code onto the page as text.

    If you can't repro this, ping me please and I'll make a definitive test case.

    Thanks.

  4. archon810
    Member
    Posted 1 year ago #

    Just reproed the cluster&@*$:

    EVO 4G is a keyword entered in the plugin.

    The original HTML is:

    <li>Select the EVO 4G and <em>Buy with new plan</em>: 
    
        <br /><a href="http://www.androidpolice.com/wp-content/uploads/2010/06/image155.png"><em><img style="display: inline" title="[Secret Deal] Get The HTC EVO 4G From Sprint.com For $150 ($50 Off)" alt="[Secret Deal] Get The HTC EVO 4G From Sprint.com For $150 ($50 Off)" src="http://www.androidpolice.com/wp-content/uploads/2010/06/image_thumb156.png" width="325" height="151" /></em></a><em> </em></li>

    The plugin turns it into:

    <li>Select the EVO 4G and <em>Buy with new plan</em>:       <br /><a href="http://www.androidpolice.com/wp-content/uploads/2010/06/image155.png"><em><img style="display: inline" title="[Secret Deal] Get The <a title=" htc evo href="http://www.dpbolvw.net/sq112efolfn26C3849B243A965A8?sid=ap">HTC EVO 4G</em></a> From Sprint.com For $150 ($50 Off)" alt="[Secret Deal] Get The HTC EVO 4G From Sprint.com For $150 ($50 Off)" src="http://www.androidpolice.com/wp-content/uploads/2010/06/image_thumb156.png" width="325" height="151" /><em> </em>
    
    </li>

    So basically it's transforming the title attribute as well, which it shouldn't do (Windows Live Writer adds a title element automatically when you add an alt).

Topic Closed

This topic has been closed to new replies.

About this Topic