[wp-trac] [WordPress Trac] #28817: WP4.0-beta1 - string concatenation for $page_title in add_submenu_page() is broken
WordPress Trac
noreply at wordpress.org
Fri Jul 11 00:48:43 UTC 2014
#28817: WP4.0-beta1 - string concatenation for $page_title in add_submenu_page() is
broken
------------------------------+-----------------------------
Reporter: harmr | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 4.0
Component: Administration | Version: trunk
Severity: major | Resolution:
Keywords: has-patch commit | Focuses: administration
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* focuses: => administration
* severity: normal => major
* component: Menus => Administration
* priority: normal => high
* milestone: Awaiting Review => 4.0
* keywords: => has-patch commit
Comment:
Confirmed, thank you for the report. The code results in broken markup:
{{{
<li class="wp-first-item <span style="font-size:92%;">Maps Marker
Pro</span> - List all markers">
}}}
Introduced in [28778].
1. Both `$menu[3]` and `$sub_item[3]` are reserved for page title, see
[27151] and [source:tags/3.9.1/src/wp-admin/includes/plugin.php#L1133
add_submenu_page()].
2. We should definitely use `sanitize_html_class()` there.
See [attachment:28817.patch].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28817#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list