From 26a90ce4626dd3933d4d50781117dfdcb35bf5af Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 21 Mar 2019 10:45:51 +0000 Subject: [PATCH] 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 --- wp-includes/class-walker-page.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-walker-page.php b/wp-includes/class-walker-page.php index 3ade8b00df..50990298f1 100644 --- a/wp-includes/class-walker-page.php +++ b/wp-includes/class-walker-page.php @@ -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 . '"'; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index d249203618..b22d3d3499 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.