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

Unified Diff: chrome/browser/ui/webui/chromeos/login/network_dropdown.cc

Issue 1107343002: Unescape ampersands in network names on network selection screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment resolved Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
index 274e7d0afbea9cd2ad71cc91cfa814f98f4575ff..4c821d826328c88f231d4628aab46cd78764e984 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
@@ -6,6 +6,8 @@
#include <string>
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h"
@@ -86,7 +88,10 @@ base::ListValue* NetworkMenuWebUI::ConvertMenuModel(ui::MenuModel* model) {
id = model->GetCommandIdAt(i);
base::DictionaryValue* item = new base::DictionaryValue();
item->SetInteger("id", id);
- item->SetString("label", model->GetLabelAt(i));
+ base::string16 label = model->GetLabelAt(i);
+ ReplaceSubstringsAfterOffset(&label, 0, base::ASCIIToUTF16("&&"),
+ base::ASCIIToUTF16("&"));
+ item->SetString("label", label);
gfx::Image icon;
if (model->GetIconAt(i, &icon)) {
SkBitmap icon_bitmap = icon.ToImageSkia()->GetRepresentation(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698