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. git-svn-id: https://develop.svn.wordpress.org/trunk@44958 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ae0605b323
commit
64681631f1
|
@ -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 . '"';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue