Make WordPress Core

Ticket #48011: trac-48011.diff

File trac-48011.diff, 487 bytes (added by achyuthajoy, 5 years ago)

Patch to fix problems with special characters & quotes on categories while adding them to menus

  • src/wp-includes/nav-menu.php

    diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php
    index a99ddb3cef..f130d2f3e1 100644
    a b function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item 
    484484                        }
    485485                }
    486486
    487                 if ( wp_unslash( $args['menu-item-title'] ) == wp_specialchars_decode( $original_title ) ) {
     487                if ( $args['menu-item-title'] == $original_title ) {
    488488                        $args['menu-item-title'] = '';
    489489                }
    490490