🔀 Merge pull request #446 from tomy0000000/dev

🛠 Links render hook should add `noreferrer noopener`
This commit is contained in:
James Panther
2023-01-20 08:40:21 +11:00
committed by GitHub
+2 -2
View File
@@ -1,3 +1,3 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noreferrer noopener"{{ end }}>
{{- .Text | safeHTML -}}
</a>
</a>