mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`. See [33016]. Fixes #40401. Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb. git-svn-id: https://develop.svn.wordpress.org/trunk@51115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1425,8 +1425,8 @@ class WP_List_Table {
|
||||
}
|
||||
|
||||
// Comments column uses HTML in the display name with screen reader text.
|
||||
// Instead of using esc_attr(), we strip tags to get closer to a user-friendly string.
|
||||
$data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
|
||||
// Strip tags to get closer to a user-friendly string.
|
||||
$data = 'data-colname="' . esc_attr( wp_strip_all_tags( $column_display_name ) ) . '"';
|
||||
|
||||
$attributes = "class='$classes' $data";
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
$classes .= ' hidden';
|
||||
}
|
||||
|
||||
$data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
|
||||
$data = 'data-colname="' . esc_attr( wp_strip_all_tags( $column_display_name ) ) . '"';
|
||||
|
||||
$attributes = "class='$classes' $data";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user