Skip to content

Commit cff431f

Browse files
authored
Merge pull request #1772 from johnhenley/dev96/issues/leading-comma-taglist-1771
FIX: remove leading comma in list of topic tags in TopicView
2 parents ac7c90d + ac21a65 commit cff431f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,12 +1040,15 @@ private string ParseContent(DataRow dr, string template, int rowcount)
10401040
var tagList = string.Empty;
10411041
foreach (var tag in tags.Split(','))
10421042
{
1043-
if (tagList != string.Empty)
1043+
if (!string.IsNullOrEmpty(tag))
10441044
{
1045-
tagList += ", ";
1046-
}
1045+
if (tagList != string.Empty)
1046+
{
1047+
tagList += ", ";
1048+
}
10471049

1048-
tagList += "<a href=\"" + Utilities.NavigateURL(this.TabId, string.Empty, new[] { ParamKeys.ViewType + "=search", ParamKeys.Tags + "=" + System.Net.WebUtility.UrlEncode(tag) }) + "\">" + tag + "</a>";
1050+
tagList += "<a href=\"" + Utilities.NavigateURL(this.TabId, string.Empty, new[] { ParamKeys.ViewType + "=search", ParamKeys.Tags + "=" + System.Net.WebUtility.UrlEncode(tag) }) + "\">" + tag + "</a>";
1051+
}
10491052
}
10501053

10511054
sOutput = sOutput.Replace("[AF:LABEL:TAGS]", tagList);

0 commit comments

Comments
 (0)