summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc
index f1b153781..42b639504 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -348,7 +348,7 @@ function drupal_get_html_head() {
* This function can be called as long the HTML header hasn't been sent.
*
* @param $url
- * A url for the feed.
+ * An internal system path or a fully qualified external URL of the feed.
* @param $title
* The title of the feed.
*/
@@ -358,10 +358,14 @@ function drupal_add_feed($url = NULL, $title = '') {
if (isset($url)) {
$stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
- drupal_add_html_head_link(array('rel' => 'alternate',
- 'type' => 'application/rss+xml',
- 'title' => $title,
- 'href' => $url));
+ drupal_add_html_head_link(array(
+ 'rel' => 'alternate',
+ 'type' => 'application/rss+xml',
+ 'title' => $title,
+ // Force the URL to be absolute, for consistency with other <link> tags
+ // output by Drupal.
+ 'href' => url($url, array('absolute' => TRUE)),
+ ));
}
return $stored_feed_links;
}