Make WordPress Core


Ignore:
Timestamp:
04/16/2019 12:45:05 AM (6 years 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.

File:
1 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() ) { ?>
Note: See TracChangeset for help on using the changeset viewer.