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(css): escape double quotes in url() when lightningcss is used #18997

Merged

Conversation

sapphi-red
Copy link
Member

Description

fixes #18994

@sapphi-red sapphi-red added feat: css p3-minor-bug An edge case that only affects very specific usage (priority) labels Dec 18, 2024
Comment on lines +279 to +284
test('preinlined SVG', async () => {
expect(await getBg('.css-url-preinlined-svg')).toMatch(
/data:image\/svg\+xml,.+/,
)
})

Copy link
Member Author

Choose a reason for hiding this comment

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

When lightningcss is not used, preinlined SVGs were working without this PR. I added this so that we don't break this usecase in future.

@patak-dev patak-dev merged commit 3734f80 into vitejs:main Dec 18, 2024
17 checks passed
@sapphi-red sapphi-red deleted the fix/css-lightning-css-escape-double-quotes branch December 18, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LightningCSS transform, paired with data URIs, results in unescaped quotes
2 participants