WordPress.org

Make WordPress Core

Ticket #44631: 44631.diff

File 44631.diff, 637 bytes (added by birgire, 16 months ago)
  • src/wp-admin/edit.php

    diff --git src/wp-admin/edit.php src/wp-admin/edit.php
    index b1ad058..1e47a6c 100644
    if ( current_user_can( $post_type_object->cap->create_posts ) ) { 
    352352
    353353if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    354354        /* translators: %s: search keywords */
    355         printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
     355        printf(
     356                ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>',
     357                esc_html( wp_html_excerpt( get_search_query( false ), 50 , '&hellip;' ) )
     358        );
    356359}
    357360?>
    358361