mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +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. Built from https://develop.svn.wordpress.org/trunk@51115 git-svn-id: http://core.svn.wordpress.org/trunk@50724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81c4c4138c
commit
1b7df89e93
@ -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";
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-51114';
|
||||
$wp_version = '5.8-alpha-51115';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user