Administration: WP_Screen: strip all tags from the columns display name.

This ensures all the column titles, not just the Comments column one, are
"clean" when later reused for the Screen Options checkboxes. Also introduces
some consistency with what is already done in WP_List_Table.

Fixes #41261.

Built from https://develop.svn.wordpress.org/trunk@41148


git-svn-id: http://core.svn.wordpress.org/trunk@40988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-07-25 16:05:44 +00:00
parent c957321007
commit ac82a26fc5
2 changed files with 7 additions and 4 deletions

View File

@ -1085,9 +1085,12 @@ final class WP_Screen {
continue;
}
if ( 'comments' == $column ) {
$title = __( 'Comments' );
}
/*
* The Comments column uses HTML in the display name with some screen
* reader text. Make sure to strip tags from the Comments column
* title and any other custom column title plugins might add.
*/
$title = wp_strip_all_tags( $title );
$id = "$column-hide";
echo '<label>';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41147';
$wp_version = '4.9-alpha-41148';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.