WordPress.org

Ready to get started?Download WordPress

Forums

Rewriting relative links (7 posts)

  1. Robert Accettura
    Member
    Posted 8 years ago #

    WordPress has a pesky issue where it doesn't rewrite relative links in posts (including images) to absolute links in rss feeds. The behavior for the site is correct (I like many strongly beieve in relative vs. absolute links for semantic purposes).

    For feeds though, to be correct and validate, they must be absolute. Meaning wordpress should prepend the siteurl to any link, <a href=""><img src=""> should become absolute.

    Has anyone found a plugin? Or a patch to WP 2.0 to fix this?

  2. moshu
    Member
    Posted 8 years ago #

    There might be other topics, too - but this is the only one I could find/remember dealing with the same issue.
    http://wordpress.org/support/topic/14925#post-86374

  3. Robert Accettura
    Member
    Posted 8 years ago #

    Ok, I just decided to just wip up a little plugin to fix it for me:
    http://robert.accettura.com/projects/absoluterss

    For anyone else who may want to fix this on their wordpress installation I hope this helps.

  4. whooami
    Member
    Posted 8 years ago #

    mmm, nice idea. I didnt realize this was an issue, and tried to use this on a 1.5.2 install -- didnt fix it for me that I can tell. Ive looked and it appears that the function names havent changed either. I also noticed there is a VERY old ticket for this in trac, 1.5.2 -- ticket is untouched, go figure.

  5. Robert Accettura
    Member
    Posted 8 years ago #

    I only tested with 2.0.

    If your checking your feed, you do need to hold down the shift key when you reload, so that you bypass cache, otherwise you don't actually refresh until you make a new post and your rss feed actually updates.

  6. whooami
    Member
    Posted 8 years ago #

    ahhh ok! Ill try that, thank you TONS!

    update: it works :) again, thank you -- too bad this isnt something taken care of by default.

  7. Robert Accettura
    Member
    Posted 8 years ago #

    Couldn't tell you why it's not taken care of by default.

    Wasn't to bad to do (it's tougher to catch the ../../ stuff, which isn't supported right now).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags