Skip to content

Commit 2357a1d

Browse files
committedNov 16, 2020
fixes #114 - noopeners added to targets _blank
1 parent df5b021 commit 2357a1d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎DancingGoat/TagHelpers/EditLinkTagHelper.cs

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
3131

3232
output.TagName = "a";
3333
output.Attributes.SetAttribute("target", "_blank");
34+
output.Attributes.SetAttribute("rel", "noopener");
3435
output.Attributes.SetAttribute("href", itemUrl);
3536
output.Attributes.Add("class", $"edit-link__overlay--{style}");
3637
output.TagMode = TagMode.StartTagAndEndTag;

‎DancingGoat/TagHelpers/EditPanelTagHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
4747
</div>
4848
</div>
4949
<div class=""edit-mode-panel__navigate-link"">
50-
<a target=""_blank"" href=""{itemUrl}"">Open content item in Kontent</a>
50+
<a target=""_blank"" rel=""noopener"" href=""{itemUrl}"">Open content item in Kontent</a>
5151
</div>";
5252
output.Content.SetHtmlContent(html);
5353

0 commit comments

Comments
 (0)