diff --git a/colorizer/colorizer_object.go b/colorizer/colorizer_object.go index a785ed9..4223dcc 100644 --- a/colorizer/colorizer_object.go +++ b/colorizer/colorizer_object.go @@ -21,17 +21,17 @@ type Colorizer struct { colors map[string]string } -func (c *Colorizer) Clear(data string) string { +func (c *Colorizer) ClearFromMarkup(data string) string { var result string = "" data = html.EscapeString(data) - data_splitted := strings.Split(data, "^") + data_splitted := strings.Split(data, ">") if len(data_splitted) > 1 { for item := range data_splitted { if len(data_splitted[item]) > 0 { - result += data_splitted[item] + result += strings.Split(data_splitted[item], "<")[0] } } } else { diff --git a/ui/mainwindow_servers_sorting.go b/ui/mainwindow_servers_sorting.go index a41d402..b2e7cbd 100644 --- a/ui/mainwindow_servers_sorting.go +++ b/ui/mainwindow_servers_sorting.go @@ -25,8 +25,8 @@ func (m *MainWindow) sortServersByName(model *gtk.TreeModel, a *gtk.TreeIter, b return 0 } - name1 := ctx.Colorizer.Clear(name1_raw.GetString()) - name2 := ctx.Colorizer.Clear(name2_raw.GetString()) + name1 := ctx.Colorizer.ClearFromMarkup(name1_raw.GetString()) + name2 := ctx.Colorizer.ClearFromMarkup(name2_raw.GetString()) if name1 < name2 { return -1