WordPress.org

Make WordPress Core

Ticket #16611: 16611.2.diff

File 16611.2.diff, 1.1 KB (added by nacin, 7 years ago)
  • wp-admin/includes/class-wp-list-table.php

     
    420420                if ( $pending_comments )
    421421                        echo '<strong>';
    422422
    423                 $link = "<a href='" . add_query_arg( 'p', $post_id, admin_url('edit-comments.php') ) . "' title='$pending_phrase' class='post-com-count'><span class='comment-count'>%s</span></a>";
     423                $link = "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>%s</span></a>";
    424424
    425                 comments_number(
    426                         sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ),
    427                         sprintf( $link, /* translators: comment count link */ _x( '1', 'comment count' ) ),
    428                         sprintf( $link, /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) )
    429                 );
     425                printf( $link, number_format_i18n( get_comments_number() ) );
    430426
    431427                if ( $pending_comments )
    432428                        echo '</strong>';