mirror of
git://develop.git.wordpress.org/
synced 2025-04-11 15:42:03 +02: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:
parent
fe1ef97ef3
commit
5001efad74
src/wp-admin/includes
@ -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";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user