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

Broken HTML in embed mode #8607

Open
3 tasks done
cherniavskii opened this issue Sep 11, 2024 · 0 comments
Open
3 tasks done

Broken HTML in embed mode #8607

cherniavskii opened this issue Sep 11, 2024 · 0 comments

Comments

@cherniavskii
Copy link
Contributor

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

In embed mode, the HTML is broken if one of the files contains $` (dollar sign followed by a backtick).
This seems to be breaking the HTML templating engine that is used in embed mode. The issue is only reproducible in embed.

How has this issue affected you? What are you trying to accomplish?

At MUI, we have a link to codesandbox for every demo in our docs using the define API.
Recently, we started using the embed mode because it's faster and it opens the file specified in the params (see mui/material-ui#43618)

To Reproduce

Go to https://codesandbox.io/embed/infallible-lederberg-st3lrx?file=%2Findex.html

The text node visible in the side panel:

In the source, you can see that it breaks where the $` symbols should be:

Link to sandbox: https://codesandbox.io/p/sandbox/infallible-lederberg-st3lrx?file=%2Findex.html

Workarounds

Putting a space between $ and ` seems to be working: https://codesandbox.io/embed/blazing-platform-k5sk46?file=%2Findex.html

Your Environment

N/A

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