diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php
index d725742c1..94a0174d5 100644
--- a/wp-includes/feed-atom.php
+++ b/wp-includes/feed-atom.php
@@ -25,7 +25,7 @@ $more = 1;
-
+
diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php
index f33398493..f75a792c1 100644
--- a/wp-includes/feed-rss2-comments.php
+++ b/wp-includes/feed-rss2-comments.php
@@ -23,7 +23,7 @@ echo '';
else
printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
?>
-
+
diff --git a/wp-includes/feed-rss2.php b/wp-includes/feed-rss2.php
index 421313062..3274583d3 100644
--- a/wp-includes/feed-rss2.php
+++ b/wp-includes/feed-rss2.php
@@ -21,7 +21,7 @@ $more = 1;
-
+
diff --git a/wp-includes/feed.php b/wp-includes/feed.php
index 871fb11e0..4cf5e6765 100644
--- a/wp-includes/feed.php
+++ b/wp-includes/feed.php
@@ -231,4 +231,21 @@ function prep_atom_text_construct($data) {
}
}
+/**
+ * self_link() - Generate a correct link for the atom:self elemet
+ *
+ * Echo the link for the currently displayed feed in a XSS safe way.
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 2.5
+ *
+ */
+function self_link() {
+ echo 'http'
+ . ( $_SERVER['https'] == 'on' ? 's' : '' ) . '://'
+ . $_SERVER['HTTP_HOST']
+ . wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1);
+}
+
?>