aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/footer.html
diff options
context:
space:
mode:
authorSimon Wörner <git@simon-woerner.de>2017-09-14 17:11:46 +0200
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-09-14 23:11:46 +0800
commit8384f0248367febcf961d2eb2d0c2adff5292d97 (patch)
tree61d876eec7cae416882811d618f083c512dea2db /layouts/partials/footer.html
parentd6ac9cd9ce7ed7228461af385982daec4f9524d9 (diff)
fix: allow all url protocols in social and menu links (#4)
Adding "| safeURL" allows the usage of "unsafe" url protocols such as irc:// or xmpp://
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r--layouts/partials/footer.html6
1 files changed, 1 insertions, 5 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 4004d7b..7ce1aaf 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -2,11 +2,7 @@
{{- range $name, $path := .Site.Params.social }}
{{- if $path }}
{{- $realName := slicestr $name 2 }}
- {{- if eq $realName "email" }}
- <a href="mailto:{{ $path }}" class="iconfont icon-{{ $realName }}" title="{{ $realName }}"></a>
- {{- else }}
- <a href="{{ $path }}" class="iconfont icon-{{ $realName }}" title="{{ $realName }}"></a>
- {{- end }}
+ <a href="{{ $path | safeURL }}" class="iconfont icon-{{ $realName }}" title="{{ $realName }}"></a>
{{- end }}
{{- end }}
<a href="{{ .Site.RSSLink }}" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>