diff --git a/GUI/Model/ModList.cs b/GUI/Model/ModList.cs index 9cf372673e..d95618bd7b 100644 --- a/GUI/Model/ModList.cs +++ b/GUI/Model/ModList.cs @@ -373,8 +373,8 @@ private DataGridViewRow MakeRow(GUIMod mod, List changes, string inst Value = "-" }; - var name = new DataGridViewTextBoxCell { Value = mod.Name.Replace("&", "&&") }; - var author = new DataGridViewTextBoxCell { Value = string.Join(", ", mod.Authors).Replace("&", "&&") }; + var name = new DataGridViewTextBoxCell { Value = ToGridText(mod.Name) }; + var author = new DataGridViewTextBoxCell { Value = ToGridText(string.Join(", ", mod.Authors)) }; var installVersion = new DataGridViewTextBoxCell() { @@ -403,7 +403,7 @@ private DataGridViewRow MakeRow(GUIMod mod, List changes, string inst var installSize = new DataGridViewTextBoxCell { Value = mod.InstallSize }; var releaseDate = new DataGridViewTextBoxCell { Value = mod.ToModule().release_date }; var installDate = new DataGridViewTextBoxCell { Value = mod.InstallDate }; - var desc = new DataGridViewTextBoxCell { Value = mod.Abstract.Replace("&", "&&") }; + var desc = new DataGridViewTextBoxCell { Value = ToGridText(mod.Abstract) }; item.Cells.AddRange(selecting, autoInstalled, updating, replacing, name, author, installVersion, latestVersion, compat, downloadSize, installSize, releaseDate, installDate, downloadCount, desc); @@ -414,6 +414,9 @@ private DataGridViewRow MakeRow(GUIMod mod, List changes, string inst return item; } + private static string ToGridText(string text) + => Platform.IsMono ? text.Replace("&", "&&") : text; + public Color GetRowBackground(GUIMod mod, bool conflicted, string instanceName) { if (conflicted)