mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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 . '"';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user