-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Quotes in YAML codeblocks can escape and leak onto the page #10726
Copy link
Copy link
Closed
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)regression
Description
What version of starlight are you using?
0.21.2
What version of astro are you using?
4.5.12
What package manager are you using?
npm
What operating system are you using?
Linux
What browser are you using?
Brave (Chromium)
Describe the Bug
Note sure if this is a bug in Starlight, Astro, Expressive Code or Shiki.
Seeing the following weird behavior for certain YAML codeblocks. I think something is not properly escaping " >, resulting in code getting leaked.
markdown to replicate:
broken:
```yaml
cmd: echo "foo" && echo "bar" > /tmp/hello.txt
```
working:
```yaml
# comment before causes it to work
cmd: echo "foo" && echo "bar" > /tmp/hello.txt
```
```yaml
- echo "foo" && echo "bar" > /tmp/hello.txt
```
```bash
echo "foo" && echo "bar" > /tmp/hello.txt
```Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-sdjcwl-k7jz7g?file=src%2Fcontent%2Fdocs%2Findex.mdx
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)regression

