Astro.slots.render
escaping HTML output
#4818
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
What version of
astro
are you using?1.2.7
Are you using an SSR adapter? If so, which one?
n/a
What package manager are you using?
npm
What operating system are you using?
Stackblitz
Describe the Bug
We have an API for passing arguments to slot children if they are functions when using the
Astro.slots.render
, which I’m trying to document.Expected behaviour
The whole process looks something like this:
A component uses
Astro.slots.render
and passes an array of arguments as the second argument when rendering:When using the component, you pass a function as its contents to be called with any arguments the component provides:
It should render the markup returned by the function in the component’s slot:
Actual behaviour
Most of the above works as expected, but the HTML markup appears to be escaped resulting in
<strong>foo</strong>
being output as plaintext in the browser:Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kc4vjm?file=src/ComponentWhichIteratesAList.astro
Participation
The text was updated successfully, but these errors were encountered: