Nested shortcodes seems to escape HTML
Eising opened this issue · 2 comments
Eising commented
Hi,
I'm having some weird issues with nesting shortcodes, and I'm very unsure what may have caused this, as even the examples you provide have this issue.
Here's an example:
{{< paige/gallery>}}
{{< paige/figure caption="Example." >}}
{{< paige/image src="resized/IMG_0328.jpg" >}}
{{< /paige/figure >}}
{{< /paige/gallery >}}
This produces the following HTML:
<div class="align-items-center d-flex h-100 justify-content-center paige-figure ">
<figure class=" mb-0" >
<div class="d-flex justify-content-center text-center"><p>
<span class="paige-image"></p>
<p>
<img crossorigin="anonymous" height="1920" referrerpolicy="no-referrer" src="<img src="http://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" alt="http://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" title="http://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" />" width="1440" >
</span></p>
</div>
<figcaption class="figure-caption mt-2 text-center" >Example.</figcaption>
</figure>
</div>
I can get around some of it by using the {{</*
tags inside of the first shortcode, but I thought I'd rather ask here since this deviates from the documentation provided.
Thanks, and I hope you can help!
Eising commented
My hugo version, in case this is relevant:
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended darwin/arm64 BuildDate=2024-01-05T12:21:15Z VendorInfo=brew
Eising commented
Nevermind. This is because I was rendering with the org-mode renderer.