diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 14 | ||||
-rw-r--r-- | includes/theme.inc | 3 |
2 files changed, 11 insertions, 6 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; } diff --git a/includes/theme.inc b/includes/theme.inc index 4d8e054d7..f3ace1368 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1866,7 +1866,8 @@ function theme_more_help_link($variables) { * * @param $variables * An associative array containing: - * - url: The url of the feed. + * - url: An internal system path or a fully qualified external URL of the + * feed. * - title: A descriptive title of the feed. */ function theme_feed_icon($variables) { |