Skip to content

Commit

Permalink
fix(config-toggle): unescape HTML chars from the inner (#71)
Browse files Browse the repository at this point in the history
When using nested shortcodes with the config toggle, the .Inner will be escaped, use htmlUnescape to revert it into the raw content.
  • Loading branch information
razonyang authored Sep 8, 2023
1 parent 3db86d9 commit e703561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/bootstrap/config-toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="tab-content">
{{- range $i, $lang := $langs -}}
{{- $id := printf "code-toggle-%s-%s" $idPrefix $lang -}}
{{- $code := $.Inner | transform.Unmarshal | transform.Remarshal $lang -}}
{{- $code := $.Inner | htmlUnescape | transform.Unmarshal | transform.Remarshal $lang -}}
{{- $code = replaceRE "\n+" "\n" $code -}}
<div
class="tab-pane fade{{ cond (eq $i 0) ` show active` `` }}"
Expand Down

0 comments on commit e703561

Please sign in to comment.