Make WordPress Core

Ticket #24232: 24232.diff

File 24232.diff, 943 bytes (added by markjaquith, 11 years ago)
  • wp-includes/link-template.php

    function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $ex 
    12201220        if ( empty($post) )
    12211221                return;
    12221222
    1223         if ( empty($post->post_title) )
     1223        $post_title = get_the_title( $post->ID );
     1224
     1225        if ( empty( $post_title ) )
    12241226                $post_title = $previous ? __('Previous Post') : __('Next Post');
    1225         else
    1226                 $post_title = $post->post_title;
    12271227
    12281228        $date = mysql2date(get_option('date_format'), $post->post_date);
    12291229
    12301230        $title = str_replace('%title', $post_title, $title);
    12311231        $title = str_replace('%date', $date, $title);
    1232         $title = apply_filters('the_title', $title, $post->ID);
     1232        $title = strip_tags( $title );
    12331233
    12341234        $link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
    12351235        $link .= esc_attr( $title );