WordPress.org

Make WordPress Core

Ticket #15046: rel_links_strip_tags.patch

File rel_links_strip_tags.patch, 878 bytes (added by drzraf, 8 years ago)
  • wp-includes/link-template.php

     
    10841084        $title = apply_filters('the_title', $title, $post->ID);
    10851085
    10861086        $link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
    1087         $link .= esc_attr( $title );
     1087        $link .= esc_attr( strip_tags( $title ) );
    10881088        $link .= "' href='" . get_permalink($post) . "' />\n";
    10891089
    10901090        $adjacent = $previous ? 'previous' : 'next';
     
    12221222        $title = apply_filters('the_title', $title, $post->ID);
    12231223
    12241224        $link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
    1225         $link .= esc_attr($title);
     1225        $link .= esc_attr(strip_tags($title));
    12261226        $link .= "' href='" . get_permalink($post) . "' />\n";
    12271227
    12281228        $boundary = $start ? 'start' : 'end';