Menus: Ensure that category menus with special characters can be updated.

Slashes and HTML encoding could cause some menus not to be updated.

Fixes #48011.

Props zaheerahmad, achyuthajoy, desrosj, pento, SergeyBiryukov, donmhico, audrasjb, birgire, mikeschroder.


Built from https://develop.svn.wordpress.org/trunk@48416


git-svn-id: http://core.svn.wordpress.org/trunk@48185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-07-10 06:00:08 +00:00
parent 9397ad46ba
commit 2c3672d2d1
2 changed files with 2 additions and 2 deletions

View File

@ -492,7 +492,7 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
}
}
if ( $args['menu-item-title'] == $original_title ) {
if ( wp_unslash( $args['menu-item-title'] ) == wp_specialchars_decode( $original_title ) ) {
$args['menu-item-title'] = '';
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-beta1-48415';
$wp_version = '5.5-beta1-48416';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.