Ticket #1748 (assigned defect)

Opened 3 years ago

Last modified 1 year ago

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

Reported by: digitalgimpus Assigned to: markjaquith (accepted)
Priority: normal Milestone: 2.9
Component: General Version: 1.5.2
Severity: normal Keywords: needs-patch
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

10/03/06 23:04:20 changed by markjaquith

  • keywords set to needs-patch.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.
  • milestone set to 2.2.

I'll work on this after 2.1

02/21/07 13:45:27 changed by robertaccettura

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/

03/24/07 21:33:50 changed by rob1n

  • priority changed from normal to high.
  • component changed from Template to General.
  • severity changed from normal to major.

04/12/07 18:13:31 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

(in reply to: ↑ description ) 04/12/07 18:14:54 changed by foolswisdom

  • 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.

09/13/07 05:08:43 changed by ryan

  • milestone changed from 2.3 to 2.4.

11/05/07 15:50:54 changed by pishmishy

  • 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?