diff options
author | dataCobra <datacobra@thinkbot.de> | 2021-11-20 20:37:40 +0300 |
---|---|---|
committer | dataCobra <datacobra@thinkbot.de> | 2021-12-07 11:56:16 +0300 |
commit | e4f51a240c75e1f533fd6426f32f3b68eef3592d (patch) | |
tree | c9a617e137d60b9cc9873f6901aabd61dfa6aead | |
parent | 4c3f9a6b9bf6af0e9eeaed85ece42f6dafd3498f (diff) |
Fix #76 (use safeURL)
With the usage of the safeURL function users are now capable to use
different types of links behind either a menuitem or a socialitem.
For example a IRC address. -> "irc://example.example.org"
-rw-r--r-- | layouts/partials/header.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 491cfe7..56673e6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -32,7 +32,7 @@ {{- if $key.url }} <li><a href="{{ relURL $key.url }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li> {{- else }} -<li><a href="{{ $key.cmd }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li> +<li><a href="{{ $key.cmd | safeURL }}"><i title="{{ $key.name }}" class="icons {{ $key.icon }}"></i></a></li> {{- end }} {{- end }} {{- end }} @@ -45,7 +45,7 @@ <nav> <ul> {{- range .Site.Menus.main }} -<li><a href="{{ .URL }}">{{ .Name }}</a></li> +<li><a href="{{ .URL | safeURL }}">{{ .Name }}</a></li> {{- end }} </ul> </nav> |