diff --git a/layouts/partials/templates/blocks.html b/layouts/partials/templates/blocks.html
index 280aa6aa5d..765b884ac7 100644
--- a/layouts/partials/templates/blocks.html
+++ b/layouts/partials/templates/blocks.html
@@ -9,8 +9,10 @@
{{ $section := $.ctx.Scratch.Get "section" }}
{{ $headers := findRE "
(.|\n)*?" $section }}
{{ range $headers }}
-{{ $header := . | replaceRE "?h2.*?>" "" | htmlUnescape }}
-{{ $header }}
+{{ $id := . | strings.TrimPrefix ".*" "" }}
+{{ $header := . | replaceRE "?h2.*?>" "" | htmlUnescape | safeHTML }}
+
{{ $header }}
{{ end }}
{{ $.ctx.Scratch.Add "sections" $section }}
{{ end }}