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
This commit is contained in:
parent
a5293aa581
commit
791998fb7c
|
@ -251,7 +251,7 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
|||
printf(
|
||||
/* translators: %s: Search query. */
|
||||
__( 'Search results for: %s' ),
|
||||
'<strong>' . wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) . '</strong>'
|
||||
'<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>'
|
||||
);
|
||||
echo '</span>';
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue