Make WordPress Core

Changeset 41148


Ignore:
Timestamp:
07/25/2017 04:04:50 PM (7 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r40800 r41148  
    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";
Note: See TracChangeset for help on using the changeset viewer.