1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 18:45:30 -04:00

only add target=_blank to external links

This commit is contained in:
2019-12-23 10:46:47 -06:00
parent f10510a7ab
commit e25c98154e
4 changed files with 5 additions and 5 deletions

View File

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