WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#1748 closed defect (bug) (wontfix)

root-relative links should be converted to absolute in rss feeds

Reported by: digitalgimpus Owned by: markjaquith
Milestone: Priority: normal
Severity: normal Version: 1.5.2
Component: General Keywords: needs-patch
Focuses: Cc:

Description

currently bloggers may use relative links to link to a past post, or some other page in their site:

/archives/foo/bar

that is invalid in a feed, as all URI's need to be absolute (for rather obvious reasons).

The correct fix would be to find relative links in a post, and convert them to absolute.

This is important where full-text feeds are provided, as the links break. Some tools automatically assume and fix it, but some do not. feedvalidator.org says it's bad.

Change History (9)

comment:1 markjaquith8 years ago

  • Keywords needs-patch added
  • Milestone set to 2.2
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

I'll work on this after 2.1

comment:2 robertaccettura7 years ago

I wrote a plugin to help with this problem a while back. Doesn't cover every case though. For reference:
http://robert.accettura.com/projects/absoluterss/

comment:3 rob1n7 years ago

  • Component changed from Template to General
  • Priority changed from normal to high
  • Severity changed from normal to major

comment:4 foolswisdom7 years ago

  • Milestone changed from 2.2 to 2.3

comment:5 in reply to: ↑ description foolswisdom7 years ago

  • Priority changed from high to normal
  • Severity changed from major to normal

Replying to digitalgimpus:

that is invalid in a feed, as all URI's need to be absolute (for rather obvious reasons).

I think that is only true for RSS (not ATOM), and still would probably consider the feed reader broken for RSS.

comment:6 ryan7 years ago

  • Milestone changed from 2.3 to 2.4

comment:7 pishmishy6 years ago

  • Summary changed from relative links should be converted to absolute in rss feeds to root-relative links should be converted to absolute in rss feeds

I don't believe that there's a full solution to this ticket. The intended destination of a relative link inside a post is ambiguous. A relative link to foo/bar.html can link to http://myblog.com/foo/bar.html on the main page, http://myblog.com/category/uncategorized/foo/bar.html in the archives and http://myblog.com/2007/11/05/8/foo/bar.html when viewing a single post.

What we can do is attempt to fix "root-relative" links (those starting in /). I'm not sure this is worth fixing. Can someone point to the place where relative links are not allowed?

comment:8 Denis-de-Bernardy5 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

closing as plugin material/wontfix from lack of activity in the past 18 months

comment:9 Denis-de-Bernardy5 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.