From 15246c6e399d7817500a6a3f9881918ef111d0c2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Mar 2020 19:21:07 +0000 Subject: [PATCH] Menus: When adding a label for special pages in `wp_setup_nav_menu_item()` strip all HTML tags, as the label is escaped on output. Follow-up to [47211], [47213]. Props stiofansisland. Reviewed by whyisjake, SergeyBiryukov. Merges [47458] to the 5.4 branch. Fixes #49374. Built from https://develop.svn.wordpress.org/branches/5.4@47465 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47252 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 3493961794..12d5c31ba2 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -822,7 +822,7 @@ function wp_setup_nav_menu_item( $menu_item ) { $menu_post = get_post( $menu_item->object_id ); $post_states = get_post_states( $menu_post ); if ( $post_states ) { - $menu_item->type_label = implode( ',', $post_states ); + $menu_item->type_label = wp_strip_all_tags( implode( ', ', $post_states ) ); } } } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index ecb803b78f..09305e12b2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-RC2-47464'; +$wp_version = '5.4-RC2-47465'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.