1
0
Fork 0

auto-add target=_blank to external links

This commit is contained in:
dark_hash 2025-01-22 21:28:13 +01:00
parent 33470bf9ff
commit 225c3dae87

View file

@ -0,0 +1 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>