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

Fix .html file escaping #9606

Merged
merged 19 commits into from
Jan 23, 2024
Merged

Conversation

eryue0220
Copy link
Contributor

Changes

Close #9480

Correctly parse in .html

`There are \`${count}\` things!`
  • What does this change?
  • Be short and concise. Bullet points can help!
  • Before/after screenshots can help as well.
  • Don't forget a changeset! pnpm exec changeset

Testing

Add test/html-escape-bug.test.js along with fixture.

Docs

n/a. bug fix to the template.

Copy link

changeset-bot bot commented Jan 4, 2024

🦋 Changeset detected

Latest commit: d778e89

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Jan 4, 2024
@eryue0220 eryue0220 marked this pull request as draft January 4, 2024 13:56
@eryue0220 eryue0220 marked this pull request as ready for review January 5, 2024 10:39
.changeset/metal-garlics-exercise.md Outdated Show resolved Hide resolved
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! There might be a different approach for this, but this is definitely a step in the right direction.

packages/astro/src/vite-plugin-html/transform/utils.ts Outdated Show resolved Hide resolved
@natemoo-re natemoo-re force-pushed the fix/astro-html-escape-bug branch from a1ffd66 to 29b8e77 Compare January 5, 2024 18:19
@natemoo-re natemoo-re changed the title fix(astro/vite-html-plugin): string template escape bug Fix HTML escaping Jan 5, 2024
@natemoo-re natemoo-re changed the title Fix HTML escaping Fix .html file escaping Jan 5, 2024
Copy link
Member

@MoustaphaDev MoustaphaDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I'm just curious about the reasoning behind some code

@sarah11918 sarah11918 removed the pr: docs A PR that includes documentation for review label Jan 9, 2024
@natemoo-re natemoo-re merged commit e6945bc into withastro:main Jan 23, 2024
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: .html pages unescape escaped entities in JS strings
5 participants