Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.412
diff -u -p -r1.412 menu.inc
--- includes/menu.inc	27 Sep 2010 22:11:38 -0000	1.412
+++ includes/menu.inc	2 Oct 2010 21:46:48 -0000
@@ -822,6 +822,14 @@ function _menu_link_translate(&$item, $t
     // Complete the path of the menu link with elements from the current path,
     // if it contains dynamic placeholders (%).
     $map = explode('/', $item['link_path']);
+    
+    // replace % params in the map with actual values from the url
+    foreach($map as $i => $value) {
+      if (strpos($value, '%') === 0) {
+        $map[$i] = arg($i);
+      }
+    }
+
     if (strpos($item['link_path'], '%') !== FALSE) {
       // Invoke registered to_arg callbacks.
       if (!empty($item['to_arg_functions'])) {
Index: modules/simpletest/tests/menu.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/menu.test,v
retrieving revision 1.36
diff -u -p -r1.36 menu.test
--- modules/simpletest/tests/menu.test	1 Oct 2010 15:24:18 -0000	1.36
+++ modules/simpletest/tests/menu.test	2 Oct 2010 21:46:49 -0000
@@ -882,6 +882,33 @@ class MenuBreadcrumbTestCase extends Dru
     );
     $this->assertBreadcrumb('user/' . $this->admin_user->uid . '/edit', $trail, $this->admin_user->name);
 
+    // Create a second user to verify breadcrumb on user pages again.
+    $this->web_user = $this->drupalCreateUser(array(
+      'access user profiles',
+    ));
+    $this->drupalLogin($this->web_user);
+
+    // Verify correct breadcrumb and page title when viewing another user's
+    // account (without menu link).
+    $trail = $home;
+    $this->assertBreadcrumb('user/' . $this->admin_user->uid, $trail, $this->admin_user->name);
+
+    // Verify correct breadcrumb and page title when viewing another user's
+    // account edit page (without menu link).
+    $trail += array(
+      'user/' . $this->admin_user->uid => $this->admin_user->name,
+    );
+    $this->assertBreadcrumb('user/' . $this->admin_user->uid . '/edit', $trail, $this->admin_user->name);
+
+    // Verify correct breadcrumb and page title when viewing own user account
+    // pages (without menu link).
+    $trail = $home;
+    $this->assertBreadcrumb('user/' . $this->web_user->uid, $trail, $this->web_user->name);
+    $trail += array(
+      'user/' . $this->web_user->uid => $this->web_user->name,
+    );
+    $this->assertBreadcrumb('user/' . $this->web_user->uid . '/edit', $trail, $this->web_user->name);
+
     // Add a Navigation menu links for 'user' and $this->admin_user.
     // Although it may be faster to manage these links via low-level API
     // functions, there's a lot that can go wrong in doing so.
