🔀 Merge pull request #446 from tomy0000000/dev

🛠 Links render hook should add `noreferrer noopener`
pull/452/head
James Panther 2023-01-20 08:40:21 +11:00 committed by GitHub
commit c0404958c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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 -}} {{- .Text | safeHTML -}}
</a> </a>