From 30b41d8338d0f3de8e58cbd50b7e9ff93a7b9967 Mon Sep 17 00:00:00 2001 From: Razon Yang Date: Thu, 11 Jan 2024 11:36:14 +0800 Subject: [PATCH] fix(accordion): escape invalid chars (#101) --- layouts/partials/bootstrap/accordion.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/bootstrap/accordion.html b/layouts/partials/bootstrap/accordion.html index 599e3cc..5785abe 100644 --- a/layouts/partials/bootstrap/accordion.html +++ b/layouts/partials/bootstrap/accordion.html @@ -25,14 +25,14 @@ {{- else if eq $items false }} {{- warnf `[bootstrap][accordion] the data file is missing: %s.` $data }} {{- else }} - {{- $id := printf "accordion-%d-%s" .Ordinal $data }} + {{- $id := printf "accordion-%d-%s" .Ordinal $data | anchorize }}
{{- $first := true }} {{- range $name, $item := sort $items "weight" }} {{- $show := cond (isset . "show") .show $first }} - {{- $itemID := printf "%s-%d" $id $name }} + {{- $itemID := printf "%s-%d" $id $name | anchorize }}