Make WordPress Core

Ticket #46922: 0001-Remove-white-space-from-Atom-s-updated.patch

File 0001-Remove-white-space-from-Atom-s-updated.patch, 1.8 KB (added by josephwa, 6 years ago)
  • wp-includes/feed-atom-comments.php

    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' ); 
    4343        </title>
    4444        <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    4545
    46         <updated>
    47         <?php
     46        <updated><?php
    4847                $date = get_last_build_date();
    4948                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>
    5250
    5351<?php if ( is_singular() ) { ?>
    5452        <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php comments_link_feed(); ?>" />
  • wp-includes/feed-atom.php

    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' ); 
    3030        <title type="text"><?php wp_title_rss(); ?></title>
    3131        <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    3232
    33         <updated>
    34         <?php
     33        <updated><?php
    3534                $date = get_last_build_date();
    3635                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>
    3937
    4038        <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" />
    4139        <id><?php bloginfo( 'atom_url' ); ?></id>