Skip to content

Commit 61bf918

Browse files
authored
socialIcons, fix: apply safeURL to make all URI schemes work (#1266)
1 parent 74d288f commit 61bf918

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

layouts/partials/social_icons.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="social-icons">
22
{{- range . }}
3-
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
3+
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
44
{{ partial "svg.html" . }}
55
</a>
66
{{- end }}

layouts/partials/templates/schema_json.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{- if site.Params.schema.sameAs }}
1212
{{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
1313
{{- else}}
14-
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }}
14+
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " | safeURL }}{{ end }}
1515
{{- end}}
1616
]
1717
}

0 commit comments

Comments
 (0)