From aaf4ecead6e9b1f3f103ee56d56b9a8c19ca3eee Mon Sep 17 00:00:00 2001
From: Joseph Walton <joe@kafsemo.org>
Date: Sun, 14 Apr 2019 22:08:55 +1000
Subject: [PATCH] Remove white space from Atom's <updated>.

Atom forbids leading and trailing white space in Date constructs
(RFC 4287, section 3). Ensure that none is generated.
---
 wp-includes/feed-atom-comments.php | 6 ++----
 wp-includes/feed-atom.php          | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php
index fe92ed71fa..4acd36330e 100644
--- a/wp-includes/feed-atom-comments.php
+++ b/wp-includes/feed-atom-comments.php
@@ -43,12 +43,10 @@ do_action( 'rss_tag_pre', 'atom-comments' );
 	</title>
 	<subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
 
-	<updated>
-	<?php
+	<updated><?php
 		$date = get_last_build_date();
 		echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' );
-	?>
-	</updated>
+	?></updated>
 
 <?php if ( is_singular() ) { ?>
 	<link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php comments_link_feed(); ?>" />
diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php
index a30ae3e3b1..f801f79860 100644
--- a/wp-includes/feed-atom.php
+++ b/wp-includes/feed-atom.php
@@ -30,12 +30,10 @@ do_action( 'rss_tag_pre', 'atom' );
 	<title type="text"><?php wp_title_rss(); ?></title>
 	<subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
 
-	<updated>
-	<?php
+	<updated><?php
 		$date = get_last_build_date();
 		echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' );
-	?>
-	</updated>
+	?></updated>
 
 	<link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" />
 	<id><?php bloginfo( 'atom_url' ); ?></id>
-- 
2.19.1

