WordPress.org

Ready to get started?Download WordPress

Forums

misbehaving the_permalink() (4 posts)

  1. ShareThis
    Member
    Posted 6 years ago #

    Hi there!

    I have a ShareThis plugin user who has reported a problem with ShareThis. I've tracked it down to an incompatibility between ShareThis and Simple Tags. It appears that when Simple Tags replaces tags with links due to "Active auto link tags into post content" being set, it does the replacement on the permalink returned from the standard WordPress the_permalink() template tag. Basically, a slug that matches a tag gets replaced with a link, making an invalid URL. Here's an example:

    Tag: mouse

    Permalink: http://example.com/mighty-mouse/

    Results of the_permalink(): http://example.com/mighty-/

    I tried to create a quick patch for ShareThis by stripping HTML out of the permalink, but I wasn't successful, since it appears that Simple Tags applies the replacement after the ShareThis code is run.

    Cheers!

  2. ShareThis
    Member
    Posted 6 years ago #

    Oops! The formatting foiled me. Let me try again...

    Tag: mouse

    Permalink: http://example.com/mighty-mouse/

    Results of the_permalink(): http://example.com/mighty-<a href="http://example.com/mighty-mouse/" rel="tag" title="Posts tagged with mouse">mouse</a>/

  3. moshu
    Member
    Posted 6 years ago #

    If you are at troubleshooting anyway... there were several posts like this recently:
    http://wordpress.org/support/topic/145345?replies=2

  4. Amaury Balmer
    Member
    Posted 6 years ago #

    Strange, my function don't allow remplacing tags by link into a html tag...

    Can you contact me via my contact form? (you can find it in website author :P)

Topic Closed

This topic has been closed to new replies.

About this Topic