WordPress.org

Make WordPress Core

Changeset 25315


Ignore:
Timestamp:
09/10/2013 04:54:16 PM (6 years ago)
Author:
wonderboymusic
Message:

Consistently wrap author and excerpt nodes with CDATA in feeds.

Fixes #18056.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/export.php

    r23553 r25315  
    371371        <link><?php the_permalink_rss() ?></link>
    372372        <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
    373         <dc:creator><?php echo get_the_author_meta( 'login' ); ?></dc:creator>
     373        <dc:creator><?php echo wxr_cdata( get_the_author_meta( 'login' ) ); ?></dc:creator>
    374374        <guid isPermaLink="false"><?php the_guid(); ?></guid>
    375375        <description></description>
  • trunk/src/wp-includes/feed-rdf.php

    r13113 r25315  
    4040    <title><?php the_title_rss() ?></title>
    4141    <link><?php the_permalink_rss() ?></link>
    42      <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
    43     <dc:creator><?php the_author() ?></dc:creator>
     42    <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
     43    <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
    4444    <?php the_category_rss('rdf') ?>
    4545<?php if (get_option('rss_use_excerpt')) : ?>
    46     <description><?php the_excerpt_rss() ?></description>
     46    <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
    4747<?php else : ?>
    48     <description><?php the_excerpt_rss() ?></description>
     48    <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
    4949    <content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
    5050<?php endif; ?>
  • trunk/src/wp-includes/feed-rss2.php

    r21235 r25315  
    3737        <comments><?php comments_link_feed(); ?></comments>
    3838        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
    39         <dc:creator><?php the_author() ?></dc:creator>
     39        <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
    4040        <?php the_category_rss('rss2') ?>
    4141
Note: See TracChangeset for help on using the changeset viewer.