{{ if ne .Params.share false }}
{{ range where site.Data.page_sharer.links "enable" true }} {{/* Utilise `urlquery` over `htmlEscape` to encode sharing URL */}} {{/* See https://github.com/HugoBlox/hugo-blox-builder/pull/2726 */}} {{ $link := replace .url "{url}" ($.Permalink | urlquery) }} {{ $link = replace $link "{title}" ($.Title | urlquery) }} {{/* Workaround `urlquery` encoding for mailto as `urlquery` encodes `+` as `%2B` and ` ` (space) as `+` */}} {{ if eq (urls.Parse $link).Scheme "mailto" }} {{ $link = replace $link "+" "%20" }} {{ end }} {{ partial "functions/get_icon" (dict "name" .icon "attributes" "style=\"height: 1em;\"") }} {{ end }}
{{ end }}