Index: wp-content/themes/twentyten/functions.php
===================================================================
--- wp-content/themes/twentyten/functions.php	(revision 17191)
+++ wp-content/themes/twentyten/functions.php	(working copy)
@@ -499,3 +499,9 @@
 	);
 }
 endif;
+
+add_filter('menu_page','my_menu_page',10,3);
+add_filter('submenu_page','my_menu_page',10,5);
+function my_menu_page( $html, $item, $key, $item2 = null, $key2 = null ) {
+	return $html;
+}
Index: wp-admin/menu-header.php
===================================================================
--- wp-admin/menu-header.php	(revision 17191)
+++ wp-admin/menu-header.php	(working copy)
@@ -95,10 +95,11 @@
 				$menu_file = substr($menu_file, 0, $pos);
 			if ( ('index.php' != $item[2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") || !empty($menu_hook) ) {
 				$admin_is_parent = true;
-				echo "\n\t<div class='wp-menu-image'><a href='admin.php?page={$item[2]}'>$img</a></div>$toggle<a href='admin.php?page={$item[2]}'$class$tabindex>{$item[0]}</a>";
+				$page = "admin.php?page={$item[2]}";
 			} else {
-				echo "\n\t<div class='wp-menu-image'><a href='{$item[2]}'>$img</a></div>$toggle<a href='{$item[2]}'$class$tabindex>{$item[0]}</a>";
+				$page = $item[2];
 			}
+			echo apply_filters( 'menu_page', "\n\t<div class='wp-menu-image'><a href='{$page}'>$img</a></div>$toggle<a href='{$page}'$class$tabindex>{$item[0]}</a>", $item, $key );
 		}
 
 		if ( !empty($submenu[$item[2]]) ) {
@@ -146,14 +147,14 @@
 				if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) {
 					// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
 					if ( (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}")) || file_exists($menu_file) )
-						$sub_item_url = add_query_arg( array('page' => $sub_item[2]), $item[2] );
+						$page = $item[2];
 					else
-						$sub_item_url = add_query_arg( array('page' => $sub_item[2]), 'admin.php' );
-					$sub_item_url = esc_url($sub_item_url);
-					echo "<li$class><a href='$sub_item_url'$class$tabindex>$title</a></li>";
+						$page = 'admin.php';
+					$sub_item_url = esc_url( add_query_arg( array('page' => $sub_item[2]), $page ) );
 				} else {
-					echo "<li$class><a href='{$sub_item[2]}'$class$tabindex>$title</a></li>";
+					$sub_item_url = $sub_item[2];
 				}
+				echo apply_filters( 'submenu_page', "<li$class><a href='$sub_item_url'$class$tabindex>$title</a></li>", $sub_item, $sub_key, $item, $key );
 			}
 			echo "</ul></div>";
 		}
