WordPress.org

Make WordPress Core

Changeset 45208


Ignore:
Timestamp:
04/16/2019 12:45:05 AM (16 months ago)
Author:
SergeyBiryukov
Message:

Feeds: Remove whitespace from <updated> elements in Atom feeds.

Per Atom format's RFC, there must not be any whitespace in a Date construct or in any IRI.

Props josephwa.
Fixes #46922.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed-atom-comments.php

    r44948 r45208  
    4444    <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    4545
    46     <updated>
    47     <?php
     46    <updated><?php // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentBeforeOpen,Squiz.PHP.EmbeddedPhp.ContentAfterOpen
    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        // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentAfterEnd
     50    ?></updated>
    5251
    5352<?php if ( is_singular() ) { ?>
  • trunk/src/wp-includes/feed-atom.php

    r44948 r45208  
    3131    <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    3232
    33     <updated>
    34     <?php
     33    <updated><?php // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentBeforeOpen,Squiz.PHP.EmbeddedPhp.ContentAfterOpen
    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        // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentAfterEnd
     37    ?></updated>
    3938
    4039    <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.