Some more url escaping in feeds. See #13555.
git-svn-id: https://develop.svn.wordpress.org/trunk@14950 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
31be303930
commit
de09357409
@ -27,7 +27,7 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
|
|||||||
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT'), false); ?></updated>
|
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT'), false); ?></updated>
|
||||||
|
|
||||||
<?php if ( is_singular() ) { ?>
|
<?php if ( is_singular() ) { ?>
|
||||||
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link(); ?>" />
|
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php comments_link_feed(); ?>" />
|
||||||
<link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
|
<link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
|
||||||
<id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
|
<id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
|
||||||
<?php } elseif(is_search()) { ?>
|
<?php } elseif(is_search()) { ?>
|
||||||
|
@ -34,7 +34,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
|||||||
<item>
|
<item>
|
||||||
<title><?php the_title_rss() ?></title>
|
<title><?php the_title_rss() ?></title>
|
||||||
<link><?php the_permalink_rss() ?></link>
|
<link><?php the_permalink_rss() ?></link>
|
||||||
<comments><?php comments_link(); ?></comments>
|
<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>
|
<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><?php the_author() ?></dc:creator>
|
||||||
<?php the_category_rss() ?>
|
<?php the_category_rss() ?>
|
||||||
@ -50,7 +50,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
|||||||
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
|
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<wfw:commentRss><?php echo get_post_comments_feed_link(null, 'rss2'); ?></wfw:commentRss>
|
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
|
||||||
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
|
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
|
||||||
<?php rss_enclosure(); ?>
|
<?php rss_enclosure(); ?>
|
||||||
<?php do_action('rss2_item'); ?>
|
<?php do_action('rss2_item'); ?>
|
||||||
|
@ -186,7 +186,17 @@ function the_excerpt_rss() {
|
|||||||
* @uses apply_filters() Call 'the_permalink_rss' on the post permalink
|
* @uses apply_filters() Call 'the_permalink_rss' on the post permalink
|
||||||
*/
|
*/
|
||||||
function the_permalink_rss() {
|
function the_permalink_rss() {
|
||||||
echo apply_filters('the_permalink_rss', get_permalink());
|
echo esc_url( apply_filters('the_permalink_rss', get_permalink() ));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs the link to the comments for the current post in an xml safe way
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
* @return none
|
||||||
|
*/
|
||||||
|
function comments_link_feed() {
|
||||||
|
echo esc_url( get_comments_link() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user