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.
Fixes #49374.
Built from https://develop.svn.wordpress.org/trunk@47458


git-svn-id: http://core.svn.wordpress.org/trunk@47245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-03-16 01:32:05 +00:00
parent 73ef224e64
commit 25333cc670
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

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