Skip to content

Commit

Permalink
fixes #114 - noopeners added to targets _blank
Browse files Browse the repository at this point in the history
  • Loading branch information
petrsvihlik committed Nov 16, 2020
1 parent df5b021 commit 2357a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions DancingGoat/TagHelpers/EditLinkTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)

output.TagName = "a";
output.Attributes.SetAttribute("target", "_blank");
output.Attributes.SetAttribute("rel", "noopener");
output.Attributes.SetAttribute("href", itemUrl);
output.Attributes.Add("class", $"edit-link__overlay--{style}");
output.TagMode = TagMode.StartTagAndEndTag;
Expand Down
2 changes: 1 addition & 1 deletion DancingGoat/TagHelpers/EditPanelTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
</div>
</div>
<div class=""edit-mode-panel__navigate-link"">
<a target=""_blank"" href=""{itemUrl}"">Open content item in Kontent</a>
<a target=""_blank"" rel=""noopener"" href=""{itemUrl}"">Open content item in Kontent</a>
</div>";
output.Content.SetHtmlContent(html);

Expand Down

0 comments on commit 2357a1d

Please sign in to comment.