Skip to content

Commit 5de0d45

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@41148 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5508cde commit 5de0d45

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/wp-admin/includes/class-wp-screen.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,12 @@ public function render_list_table_columns_preferences() {
10851085
continue;
10861086
}
10871087

1088-
if ( 'comments' == $column ) {
1089-
$title = __( 'Comments' );
1090-
}
1088+
/*
1089+
* The Comments column uses HTML in the display name with some screen
1090+
* reader text. Make sure to strip tags from the Comments column
1091+
* title and any other custom column title plugins might add.
1092+
*/
1093+
$title = wp_strip_all_tags( $title );
10911094

10921095
$id = "$column-hide";
10931096
echo '<label>';

0 commit comments

Comments
 (0)