🔀 Merge pull request #312 from nunocoracao/patch-2

External links will open in a new tab
pull/339/head
James Panther 2022-11-07 15:46:21 +11:00 committed by GitHub
commit 1bab0b736e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{- .Text | safeHTML -}}
</a>