From 535b79426a27289400be0a40a0a58530d5a3a2d0 Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 8 Dec 2008 03:46:26 +0000 Subject: [PATCH] Filter menu IDs, fixes #8523 git-svn-id: http://svn.automattic.com/wordpress/trunk@10123 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu-header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index dc9935bef6..c7a0f296e0 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -57,7 +57,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; $tabindex = ' tabindex="1"'; - $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . $item[5] . '"' : ''; + $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : ''; $img = ''; if ( isset($item[6]) && ! empty($item[6]) ) { if ( 'div' === $item[6] )