diff --git a/IsraelHiking.API/Services/Poi/PointsOfInterestProvider.cs b/IsraelHiking.API/Services/Poi/PointsOfInterestProvider.cs index b79c888e8..110484954 100644 --- a/IsraelHiking.API/Services/Poi/PointsOfInterestProvider.cs +++ b/IsraelHiking.API/Services/Poi/PointsOfInterestProvider.cs @@ -209,13 +209,13 @@ private void RemoveEmptyTagsAndWhiteSpaces(TagsCollectionBase tags) for (int i = tags.Count - 1; i >= 0; i--) { var currentTag = tags.ElementAt(i); - var valueWithOutExtraSpaces = Regex.Replace(currentTag.Value, @"\s+", " ", RegexOptions.Multiline).Trim(); - if (string.IsNullOrWhiteSpace(valueWithOutExtraSpaces)) + if (string.IsNullOrWhiteSpace(currentTag.Value)) { tags.RemoveKeyValue(currentTag); } else { + var valueWithOutExtraSpaces = Regex.Replace(currentTag.Value, @"\s+", " ", RegexOptions.Multiline).Trim(); currentTag.Value = valueWithOutExtraSpaces; tags.AddOrReplace(currentTag); }