From: Vadim Zeitlin Date: Sat, 16 Jul 2005 23:10:46 +0000 (+0000) Subject: handle '&' in the names of the files in the history correctly by quoting it X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/28ea89b62b322ea36aadb65d35caef1b0cf5de5d?ds=inline handle '&' in the names of the files in the history correctly by quoting it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index ce47e57dd5..4ca21c436e 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -2165,6 +2165,8 @@ void wxFileHistory::AddFileToHistory(const wxString& file) pathInMenu = m_fileHistory[i]; } + // we need to quote '&' characters which are used for mnemonics + pathInMenu.Replace(_T("&"), _T("&&")); wxString buf; buf.Printf(s_MRUEntryFormat, i + 1, pathInMenu.c_str()); wxList::compatibility_iterator node = m_fileMenus.GetFirst();