From 31be3039308eda02cd3464cf75223ddbf5950007 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 26 May 2010 17:27:18 +0000 Subject: [PATCH] Move the escaping into get_guid() so we don't have to repeat ourselves. See #13555. git-svn-id: https://develop.svn.wordpress.org/trunk@14949 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-app.php | 4 ++-- wp-includes/feed-atom-comments.php | 2 +- wp-includes/feed-atom.php | 2 +- wp-includes/feed-rss2.php | 2 +- wp-includes/post-template.php | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-app.php b/wp-app.php index d5eee74f34..f8feb372e2 100644 --- a/wp-app.php +++ b/wp-app.php @@ -1150,7 +1150,7 @@ EOD; function echo_entry() { ?> - ID ) ); ?> + ID ); ?> <?php echo $content ?> @@ -1167,7 +1167,7 @@ EOD; post_type == 'attachment') { ?> - + post_content ) ) : diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index 5c665d54e4..ab3447d3fc 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -73,7 +73,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); comment_parent == 0 ) : // This comment is top level ?> - + comment_parent); // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php index fa53358daa..b23dffcd9b 100644 --- a/wp-includes/feed-atom.php +++ b/wp-includes/feed-atom.php @@ -36,7 +36,7 @@ echo ''; ?> <![CDATA[<?php the_title_rss() ?>]]> - + diff --git a/wp-includes/feed-rss2.php b/wp-includes/feed-rss2.php index 3ee707e580..e97ddd5b98 100644 --- a/wp-includes/feed-rss2.php +++ b/wp-includes/feed-rss2.php @@ -39,7 +39,7 @@ echo ''; ?> - + ]]> diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2a4f5db090..a459df0bdf 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -127,13 +127,15 @@ function get_the_title( $id = 0 ) { * The guid will appear to be a link, but should not be used as an link to the * post. The reason you should not use it as a link, is because of moving the * blog across domains. + * + * Url is escaped to make it xml safe * * @since 1.5.0 * * @param int $id Optional. Post ID. */ function the_guid( $id = 0 ) { - echo get_the_guid($id); + echo esc_url( get_the_guid($id) ); } /**