CA-140181: Inconsistent name displaying when it contains symbol '&’

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 <callumiandavid.mcintyre@citrix.com>
This commit is contained in:
Callum McIntyre 2016-08-22 16:07:53 +01:00
parent 1994695fa6
commit 14288ede3a

View File

@ -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))