-
Notifications
You must be signed in to change notification settings - Fork 99
<table> is not rendered correctly in .astro components with is:raw #715
Copy link
Copy link
Open
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
What version of astro are you using?
2.0.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Linux(WSL)
Describe the Bug
The following .astro component code produces wrong HTML rendering results.
---
const html = `<table is:raw><thead><tr><th>a</th><th align="left">b</th><th align="right">c</th><th align="center">d</th></tr></thead><tbody><tr><td>1</td><td align="left">2</td><td align="right">3</td><td align="center">4</td></tr></tbody></table>`;
---
<table is:raw><thead><tr><th>a</th><th align="left">b</th><th align="right">c</th><th align="center">d</th></tr></thead><tbody><tr><td>1</td><td align="left">2</td><td align="right">3</td><td align="center">4</td></tr></tbody></table>
<hr>
<Fragment set:html={html}>The component is compiled into the following HTML, which is not desired.
abcd1234
<table></table>Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-wzww1o?file=src/pages/index.astro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
