diff --git a/site/layouts/_default/_markup/render-heading.html b/site/layouts/_default/_markup/render-heading.html index cfb3d8fe79..d115f85dcd 100644 --- a/site/layouts/_default/_markup/render-heading.html +++ b/site/layouts/_default/_markup/render-heading.html @@ -1,5 +1,7 @@ -{{ .Text | safeHTML }} +{{- $id := .Anchor | safeURL -}} +{{- $text := .Text | safeHTML -}} +{{ $text }} {{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}} - + {{- end -}}