WordPress.org

Make WordPress Core

Ticket #44916: 44916.diff

File 44916.diff, 647 bytes (added by harshall, 14 months ago)
  • wp-includes/class-walker-nav-menu.php

     
    218218                 * @param stdClass $args  An object of wp_nav_menu() arguments.
    219219                 * @param int      $depth Depth of menu item. Used for padding.
    220220                 */
    221                 $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth );
     221                $title = esc_html( apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) );
    222222
    223223                $item_output  = $args->before;
    224224                $item_output .= '<a' . $attributes . '>';