Make WordPress Core

Changeset 14950


Ignore:
Timestamp:
05/26/2010 05:47:29 PM (15 years ago)
Author:
westi
Message:

Some more url escaping in feeds. See #13555.

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r14949 r14950  
    2828
    2929<?php if ( is_singular() ) { ?>
    30     <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link(); ?>" />
     30    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php comments_link_feed(); ?>" />
    3131    <link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
    3232    <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
  • trunk/wp-includes/feed-rss2.php

    r14949 r14950  
    3535        <title><?php the_title_rss() ?></title>
    3636        <link><?php the_permalink_rss() ?></link>
    37         <comments><?php comments_link(); ?></comments>
     37        <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>
    3939        <dc:creator><?php the_author() ?></dc:creator>
     
    5151    <?php endif; ?>
    5252<?php endif; ?>
    53         <wfw:commentRss><?php echo get_post_comments_feed_link(null, 'rss2'); ?></wfw:commentRss>
     53        <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
    5454        <slash:comments><?php echo get_comments_number(); ?></slash:comments>
    5555<?php rss_enclosure(); ?>
  • trunk/wp-includes/feed.php

    r12598 r14950  
    187187 */
    188188function the_permalink_rss() {
    189     echo apply_filters('the_permalink_rss', get_permalink());
     189    echo esc_url( apply_filters('the_permalink_rss', get_permalink() ));
     190}
     191
     192/**
     193 * Outputs the link to the comments for the current post in an xml safe way
     194 *
     195 * @since 3.0.0
     196 * @return none
     197 */
     198function comments_link_feed() {
     199    echo esc_url( get_comments_link() );
    190200}
    191201
Note: See TracChangeset for help on using the changeset viewer.