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 |
| Issue tags: | absolute, recommendation, relative, url, w3c |
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
Will get a patch rolled shortly. Marking as active since there is not any actual patch here.
#2
Patch attached for review.
#3
Committed to 6.x-2.x and 5.x-2.x. Thanks!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.