Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested shortcodes seems to escape HTML #55

Closed
Eising opened this issue Jan 10, 2024 · 2 comments
Closed

Nested shortcodes seems to escape HTML #55

Eising opened this issue Jan 10, 2024 · 2 comments

Comments

@Eising
Copy link

Eising commented Jan 10, 2024

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>
&lt;span class=&#34;paige-image&#34;&gt;</p>
<p>
&lt;img   crossorigin=&#34;anonymous&#34;   height=&#34;1920&#34;   referrerpolicy=&#34;no-referrer&#34;  src=&#34;<img src="https://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" alt="https://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" title="https://localhost:1313/my/article/resized/IMG_0328.0ada02ca179336615ef4c698c34eb4872313f2bd0084b4e573e8b48ddad34475.jpg" />&#34;     width=&#34;1440&#34; &gt;
&lt;/span&gt;</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
Copy link
Author

Eising commented Jan 10, 2024

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
Copy link
Author

Eising commented Jan 10, 2024

Nevermind. This is because I was rendering with the org-mode renderer.

@Eising Eising closed this as completed Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant