Make WordPress Core


Ignore:
Timestamp:
11/07/2012 07:56:10 PM (13 years ago)
Author:
nacin
Message:

Don't return encoded ampersands from get_post_comments_feed_link() to avoid canonical redirect issues. Apply esc_url() when appropriate.

props markjaquith, SergeyBiryukov. fixes #21841.

File:
1 edited

Legend:

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

    r21332 r22431  
    2929<?php if ( is_singular() ) { ?>
    3030    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php comments_link_feed(); ?>" />
    31     <link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
    32     <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
     31    <link rel="self" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?>" />
     32    <id><?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?></id>
    3333<?php } elseif(is_search()) { ?>
    3434    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo home_url() . '?s=' . get_search_query(); ?>" />
Note: See TracChangeset for help on using the changeset viewer.