Skip to content

Commit

Permalink
socialIcons, fix: apply safeURL to make all URI schemes work (adityat…
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored and Sudhir S committed Jan 24, 2024
1 parent c80ac97 commit 296ce2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/social_icons.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="social-icons">
{{- range . }}
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
{{ partial "svg.html" . }}
</a>
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/templates/schema_json.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{- if site.Params.schema.sameAs }}
{{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
{{- else}}
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }}
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " | safeURL }}{{ end }}
{{- end}}
]
}
Expand Down

0 comments on commit 296ce2b

Please sign in to comment.