first commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{{- $u := urls.Parse .Destination -}}
|
||||
{{- $href := .Destination -}}
|
||||
{{- if and (not $u.IsAbs) (strings.HasPrefix .Destination "/") -}}
|
||||
{{- $href = relURL (strings.TrimPrefix "/" .Destination) -}}
|
||||
{{- end -}}
|
||||
<a href="{{ $href | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $u.IsAbs }} rel="noopener"{{ end }}>{{ .Text }}</a>
|
||||
{{- /* chomp */ -}}
|
||||
Reference in New Issue
Block a user