WordPress.org

Make WordPress Core

Ticket #6091: 6091.diff

File 6091.diff, 733 bytes (added by Denis-de-Bernardy, 6 years ago)

patch against 11250

  • wp-includes/default-widgets.php

     
    542542                <?php if ( $title ) echo $before_title . $title . $after_title; ?> 
    543543                <ul> 
    544544                <?php  while ($r->have_posts()) : $r->the_post(); ?> 
    545                 <li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li> 
     545                <li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li> 
    546546                <?php endwhile; ?> 
    547547                </ul> 
    548548                <?php echo $after_widget; ?>