Skip to content

Commit

Permalink
fix(accordion): escape invalid chars (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 11, 2024
1 parent 8813aea commit 30b41d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/bootstrap/accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
<div
class="accordion{{ cond $flush ` accordion-flush` `` }} mb-4"
id="{{ $id }}">
{{- $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 }}
<div class="accordion-item">
<h2 class="accordion-header">
<button
Expand Down

0 comments on commit 30b41d8

Please sign in to comment.