Download & Extend

Relative URL in description (link to original post)

Project:Comment RSS
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Dave Reid
Status:closed (fixed)
Issue tags:absolute, recommendation, relative, url, w3c

Issue Summary

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";

Comments

#1

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

Version:master» 6.x-2.x-dev
Status:active» needs review

Patch attached for review.

AttachmentSize
513492-D6-2.patch 970 bytes

#3

Status:needs review» fixed

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

#4

Status:fixed» closed (fixed)

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

#5

Hi, I'm having the same problem, but I can't seem to find the commentrss.pages.inc file. Can you tell me where to locate it? I just updated to Drupal 6.15.

nobody click here