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
|
b
|
do_action( 'rss_tag_pre', 'atom-comments' ); |
43 | 43 | </title> |
44 | 44 | <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> |
45 | 45 | |
46 | | <updated> |
47 | | <?php |
| 46 | <updated><?php |
48 | 47 | $date = get_last_build_date(); |
49 | 48 | echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' ); |
50 | | ?> |
51 | | </updated> |
| 49 | ?></updated> |
52 | 50 | |
53 | 51 | <?php if ( is_singular() ) { ?> |
54 | 52 | <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
|
b
|
do_action( 'rss_tag_pre', 'atom' ); |
30 | 30 | <title type="text"><?php wp_title_rss(); ?></title> |
31 | 31 | <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> |
32 | 32 | |
33 | | <updated> |
34 | | <?php |
| 33 | <updated><?php |
35 | 34 | $date = get_last_build_date(); |
36 | 35 | echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' ); |
37 | | ?> |
38 | | </updated> |
| 36 | ?></updated> |
39 | 37 | |
40 | 38 | <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" /> |
41 | 39 | <id><?php bloginfo( 'atom_url' ); ?></id> |