WordPress.org

Make WordPress Core

Changeset 44958


Ignore:
Timestamp:
03/21/2019 10:44:21 AM (6 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-walker-page.php

    r44416 r44958  
    184184        foreach ( $atts as $attr => $value ) {
    185185            if ( ! empty( $value ) ) {
    186                 $value       = esc_attr( $value );
     186                $value       = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
    187187                $attributes .= ' ' . $attr . '="' . $value . '"';
    188188            }
Note: See TracChangeset for help on using the changeset viewer.