Add missing uses of safeURL

This commit is contained in:
Will Faught
2023-01-24 21:46:58 -08:00
parent 2924701874
commit 7eb2dbbf35
5 changed files with 13 additions and 13 deletions

View File

@@ -24,6 +24,6 @@
{{ $pagePath := strings.TrimPrefix $basepath $.RelPermalink }}
{{ $menuPath := strings.TrimPrefix $basepath .URL }}
{{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }}
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL }}">{{ .Name }}</a>
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL | safeURL }}">{{ .Name }}</a>
{{ end }}
</nav>