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

erronoeous <code> tag rendered in output #983

Open
1 task done
WickyNilliams opened this issue Mar 16, 2024 · 0 comments
Open
1 task done

erronoeous <code> tag rendered in output #983

WickyNilliams opened this issue Mar 16, 2024 · 0 comments
Labels
needs triage Issue needs to be triaged

Comments

@WickyNilliams
Copy link

WickyNilliams commented Mar 16, 2024

Astro Info

Astro                    v4.5.5
Node                     v18.15.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

An erroneous <code> element appears in the rendered page if i use this kind of syntax:

<code>{`<foo>`}</code>

Despite the angle brackets in the string being correctly escaped in the output. I don't have the issue if i use this form:

<code>&lt;foo&gt;</code>

But that's a pain to write out, which is how i stumbled across the bug (seeking a simpler alternative).

Strangely, i've only been able to reproduce it when used inside a <table>. After the table, a <code> is rendered in the HTML.

What's the expected result?

No erroenous <code> should be rendered

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-lq1cr7

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Mar 16, 2024
@Princesseuh Princesseuh transferred this issue from withastro/astro Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant