From 4457465366c0ddbcca94b59e7c8af25637253ad7 Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Wed, 11 Jul 2018 22:38:13 +0100 Subject: [PATCH] fix for #336 escape & character. --- src/widgets/station_row.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/widgets/station_row.rs b/src/widgets/station_row.rs index 09a1398b..4169b005 100755 --- a/src/widgets/station_row.rs +++ b/src/widgets/station_row.rs @@ -31,7 +31,13 @@ impl StationRow { location_label.set_text(&format!("{} {}", station.country, station.state)); codec_label.set_text(&station.codec); - if station.homepage != "" {homepage_label.set_markup(&format!("{}", station.homepage, station.homepage)); + if station.homepage != "" { + //escape & character + let station_homepage= match station.homepage.find("&") { + None => station.homepage.clone(), + Some(_) => station.homepage.replace("&", "&"), + }; + homepage_label.set_markup(&format!("{}", station_homepage, station_homepage)); }else{homepage_label.set_text("—");} if station.tags != "" {tags_label.set_text(&station.tags);