WordPress.org

Make WordPress Core

Ticket #21841: 21841.2.patch

File 21841.2.patch, 2.3 KB (added by SergeyBiryukov, 3 years ago)
  • wp-includes/feed-atom-comments.php

     
    2828 
    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'); ?>" /> 
     31        <link rel="self" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?>" /> 
    3232        <id><?php echo 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(); ?>" /> 
  • wp-includes/feed-atom.php

     
    4848<?php atom_enclosure(); ?> 
    4949<?php do_action('atom_entry'); ?> 
    5050                <link rel="replies" type="<?php bloginfo_rss('html_type'); ?>" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/> 
    51                 <link rel="replies" type="application/atom+xml" href="<?php echo get_post_comments_feed_link(0,'atom') ?>" thr:count="<?php echo get_comments_number()?>"/> 
     51                <link rel="replies" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link(0, 'atom') ); ?>" thr:count="<?php echo get_comments_number()?>"/> 
    5252                <thr:total><?php echo get_comments_number()?></thr:total> 
    5353        </entry> 
    5454        <?php endwhile ; ?> 
  • wp-includes/link-template.php

     
    484484        } else { 
    485485                $type = get_post_field('post_type', $post_id); 
    486486                if ( 'page' == $type ) 
    487                         $url = home_url("?feed=$feed&amp;page_id=$post_id"); 
     487                        $url = add_query_arg( array( 'feed' => $feed, 'page_id' => $post_id ), home_url( '/' ) ); 
    488488                else 
    489                         $url = home_url("?feed=$feed&amp;p=$post_id"); 
     489                        $url = add_query_arg( array( 'feed' => $feed, 'p' => $post_id ), home_url( '/' ) ); 
    490490        } 
    491491 
    492492        return apply_filters('post_comments_feed_link', $url);