WordPress.org

Make WordPress Core

Changeset 47458


Ignore:
Timestamp:
03/16/2020 01:30:14 AM (5 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r47213 r47458  
    823823                        $post_states = get_post_states( $menu_post );
    824824                        if ( $post_states ) {
    825                             $menu_item->type_label = implode( ',', $post_states );
     825                            $menu_item->type_label = wp_strip_all_tags( implode( ', ', $post_states ) );
    826826                        }
    827827                    }
Note: See TracChangeset for help on using the changeset viewer.