We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a69ebd + 28d73fa commit e8b77a4Copy full SHA for e8b77a4
source/DasBlog.Web.UI/TagHelpers/Comments/CommentUserHomePageLink.cs
@@ -13,15 +13,19 @@ public class CommentUserHomePageLink : TagHelper
13
14
public override void Process(TagHelperContext context, TagHelperOutput output)
15
{
16
- output.TagName = "a";
17
output.TagMode = TagMode.StartTagAndEndTag;
18
19
if (Comment.HomePageUrl?.Length > 0)
20
+ output.TagName = "a";
21
output.Attributes.SetAttribute("href", Comment.HomePageUrl);
22
+ output.Attributes.SetAttribute("rel", "nofollow");
23
}
-
24
- output.Attributes.SetAttribute("rel", "nofollow");
+ else
25
+ {
26
+ output.TagName = "span";
27
+ }
28
+
29
output.Attributes.SetAttribute("class", "dbc-comment-user-homepage-name");
30
output.Content.SetHtmlContent(Comment.Name);
31
0 commit comments