Make WordPress Core

Ticket #40587: 40587.2.diff

File 40587.2.diff, 1000 bytes (added by stevenkword, 8 years ago)
  • src/wp-includes/link-template.php

     
    560560 * @param string $feed   Optional. Feed type. Default empty.
    561561 */
    562562function the_feed_link( $anchor, $feed = '' ) {
    563         $link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
     563        $link = '<a rel="alternate" type="' . esc_attr( feed_content_type( $feed ) ) . '" href="' . esc_url( get_feed_link( $feed ) ) . '">' . esc_html( $anchor ) . '</a>';
    564564
    565565        /**
    566566         * Filters the feed link anchor tag.
     
    699699                $link_text = __('Comments Feed');
    700700        }
    701701
    702         $link = '<a href="' . esc_url( $url ) . '">' . $link_text . '</a>';
     702        $link = '<a rel="alternate" type="' . esc_attr( feed_content_type( $feed ) ) . '" href="' . esc_url( $url ) . '">' . esc_html( $link_text ) . '</a>';
    703703        /**
    704704         * Filters the post comment feed link anchor tag.
    705705         *