From 14288ede3acf62564f401a19c0aa8bee5520fe59 Mon Sep 17 00:00:00 2001 From: Callum McIntyre Date: Mon, 22 Aug 2016 16:07:53 +0100 Subject: [PATCH] =?UTF-8?q?CA-140181:=20Inconsistent=20name=20displaying?= =?UTF-8?q?=20when=20it=20contains=20symbol=20'&=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ticket said the character after the & became a hotkey (like labels etc do with UseMnemonic enabled) but I couldn't reproduce that - & symbols were simply removed from the string. The fix is to replace them with &&, so the string.format prints a single & as it should. Signed-off-by: Callum McIntyre --- XenAdmin/TabPages/PerformancePage.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XenAdmin/TabPages/PerformancePage.cs b/XenAdmin/TabPages/PerformancePage.cs index 6e52d66a9..b83e89f51 100644 --- a/XenAdmin/TabPages/PerformancePage.cs +++ b/XenAdmin/TabPages/PerformancePage.cs @@ -360,9 +360,10 @@ namespace XenAdmin.TabPages private void DeleteGraph() { + var formattableName = GraphList.SelectedGraph.DisplayName.Replace("&", "&&"); using (ThreeButtonDialog dlog = new ThreeButtonDialog( new ThreeButtonDialog.Details(SystemIcons.Warning, - string.Format(Messages.DELETE_GRAPH_MESSAGE, GraphList.SelectedGraph.DisplayName), + string.Format(Messages.DELETE_GRAPH_MESSAGE, formattableName), Messages.XENCENTER), ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo))