Consistently wrap `author` and `excerpt` nodes with `CDATA` in feeds.
Fixes #18056. Built from https://develop.svn.wordpress.org/trunk@25315 git-svn-id: http://core.svn.wordpress.org/trunk@25277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
399a2f2ac2
commit
d39c01d30e
|
@ -370,7 +370,7 @@ function export_wp( $args = array() ) {
|
|||
<title><?php echo apply_filters( 'the_title_rss', $post->post_title ); ?></title>
|
||||
<link><?php the_permalink_rss() ?></link>
|
||||
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
||||
<dc:creator><?php echo get_the_author_meta( 'login' ); ?></dc:creator>
|
||||
<dc:creator><?php echo wxr_cdata( get_the_author_meta( 'login' ) ); ?></dc:creator>
|
||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||
<description></description>
|
||||
<content:encoded><?php echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); ?></content:encoded>
|
||||
|
|
|
@ -40,12 +40,12 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
|||
<title><?php the_title_rss() ?></title>
|
||||
<link><?php the_permalink_rss() ?></link>
|
||||
<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
|
||||
<dc:creator><?php the_author() ?></dc:creator>
|
||||
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
|
||||
<?php the_category_rss('rdf') ?>
|
||||
<?php if (get_option('rss_use_excerpt')) : ?>
|
||||
<description><?php the_excerpt_rss() ?></description>
|
||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
||||
<?php else : ?>
|
||||
<description><?php the_excerpt_rss() ?></description>
|
||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
||||
<content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
|
||||
<?php endif; ?>
|
||||
<?php do_action('rdf_item'); ?>
|
||||
|
|
|
@ -36,7 +36,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
|||
<link><?php the_permalink_rss() ?></link>
|
||||
<comments><?php comments_link_feed(); ?></comments>
|
||||
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
|
||||
<dc:creator><?php the_author() ?></dc:creator>
|
||||
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
|
||||
<?php the_category_rss('rss2') ?>
|
||||
|
||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||
|
|
Loading…
Reference in New Issue