Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chrome/common/gtk_util.cc

Issue 203078: Escape ampersands in web view text selection for right click context menu so ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gtk_util.cc
===================================================================
--- chrome/common/gtk_util.cc (revision 26282)
+++ chrome/common/gtk_util.cc (working copy)
@@ -267,9 +267,12 @@
std::string ConvertAcceleratorsFromWindowsStyle(const std::string& label) {
std::string ret;
- ret.reserve(label.length());
+ ret.reserve(label.length() * 2);
for (size_t i = 0; i < label.length(); ++i) {
- if ('&' == label[i]) {
+ if ('_' == label[i]) {
+ ret.push_back('_');
+ ret.push_back('_');
+ } else if ('&' == label[i]) {
if (i + 1 < label.length() && '&' == label[i + 1]) {
ret.push_back(label[i]);
++i;
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698