Relative URL in description (link to original post)

Hervé Saladin - July 8, 2009 - 10:38
Project:Comment RSS
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Dave Reid
Status:closed
Issue tags:absolute, recommendation, relative, url, w3c
Description

The link to original post that is placed in the "description" tag of each item is a relative URL.
The WC recommends to use only absolute URLs.
So, when we check the feed with the W3C feed validator (http://validator.w3.org/feed/) the feed is valid, but we get the following recommendation :
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

* line XX, column 0: description should not contain relative URL references: /relative/node/url (10 occurrences) [help]

This is easy to fix by using the "abolute" option of the url function :
In the file commentrss.pages.inc, line 206, replace
$content = '

'. t('In reply to @title', array('@url' => url('node/'. $comment->nid), '@title' => $comment->title)) .":

\n\n";
with
$content = '

'. t('In reply to @title', array('@url' => url('node/'. $comment->nid, array('absolute' => true)), '@title' => $comment->title)) .":

\n\n";

#1

Dave Reid - July 16, 2009 - 13:22
Assigned to:Anonymous» Dave Reid
Status:patch (to be ported)» active

Will get a patch rolled shortly. Marking as active since there is not any actual patch here.

#2

Dave Reid - July 16, 2009 - 13:36
Version:HEAD» 6.x-2.x-dev
Status:active» needs review

Patch attached for review.

AttachmentSize
513492-D6-2.patch 970 bytes

#3

Dave Reid - July 17, 2009 - 15:46
Status:needs review» fixed

Committed to 6.x-2.x and 5.x-2.x. Thanks!

#4

System Message - July 31, 2009 - 15:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.