diff options
Diffstat (limited to 'chrome/browser/back_forward_menu_model.cc')
-rw-r--r-- | chrome/browser/back_forward_menu_model.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/back_forward_menu_model.cc b/chrome/browser/back_forward_menu_model.cc index dd73cf8..6ceede4 100644 --- a/chrome/browser/back_forward_menu_model.cc +++ b/chrome/browser/back_forward_menu_model.cc @@ -70,8 +70,15 @@ string16 BackForwardMenuModel::GetLabelAt(int index) const { if (IsSeparator(index)) return string16(); + // Return the entry title, escaping any '&' characters. NavigationEntry* entry = GetNavigationEntry(index); - return entry->GetTitleForDisplay(&GetTabContents()->controller()); + string16 menu_text(entry->GetTitleForDisplay( + &GetTabContents()->controller())); + for (size_t i = menu_text.find('&'); i != string16::npos; + i = menu_text.find('&', i + 2)) { + menu_text.insert(i, 1, '&'); + } + return menu_text; } bool BackForwardMenuModel::IsLabelDynamicAt(int index) const { |