Menus: Use `esc_url()` for the `href` value of page link attributes in `Walker_Page::start_el()`, for consistency with `Walker_Nav_Menu` and `Walker_Category`.
See #40666, #40359. Built from https://develop.svn.wordpress.org/trunk@44958 git-svn-id: http://core.svn.wordpress.org/trunk@44789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bbf36b6521
commit
26a90ce462
|
@ -183,7 +183,7 @@ class Walker_Page extends Walker {
|
|||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = esc_attr( $value );
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44957';
|
||||
$wp_version = '5.2-alpha-44958';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue