From 791998fb7c8bf1895d1c8203258ea0e0d22d1428 Mon Sep 17 00:00:00 2001 From: johnjamesjacoby Date: Tue, 2 Nov 2021 15:57:59 +0000 Subject: [PATCH] Admin/Comments: remove bespoke truncation from search string HTML. This change removes a call to `wp_html_excerpt()` used on the HTML output of the search string, supplied by the current user in the previous page request via the named `s` input in the search-box UI. If the search string is extremely long, it wraps around the available empty space in a way that is not visually displeasing, confirming that truncation is not a requirement here. This also addresses a small accessibility concern as the non-truncated string was not alternatively presented, and helps normalize the output of `$_REQUEST['s']` for more broad improvements in the future. Props hareesh-pillai, jakubtyrcha, johnjamesjacoby, lukecavanagh, sabernhardt. Fixes #17636. Built from https://develop.svn.wordpress.org/trunk@51975 git-svn-id: http://core.svn.wordpress.org/trunk@51564 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-comments.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index f54d0abd8f..ba8924f1e0 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -251,7 +251,7 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { printf( /* translators: %s: Search query. */ __( 'Search results for: %s' ), - '' . wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) . '' + '' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '' ); echo ''; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1cba66b36d..612801524b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51974'; +$wp_version = '5.9-alpha-51975'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.