Skip to content

Fix missing quotes in CSS <link> tags and refactor redundant template#7993#7994

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
rahul-kr-rai:bug
Mar 12, 2026
Merged

Fix missing quotes in CSS <link> tags and refactor redundant template#7993#7994
alexander-akait merged 1 commit intowebpack:mainfrom
rahul-kr-rai:bug

Conversation

@rahul-kr-rai
Copy link
Copy Markdown
Contributor

Summary

Issue closes: #7993

This PR fixes a syntax issue in the SSG (Server-Side Generation) script where CSS <link> tags were being generated with unquoted href attributes. While most browsers handle unquoted attributes gracefully, it can lead to parsing errors if asset paths contain special characters or spaces.

Additionally, this PR simplifies the mapping logic by removing redundant template literal nesting (${path}) in favor of a cleaner string interpolation.

What kind of change does this PR introduce?

Bug fix (Fixing invalid HTML syntax)
Code cleanup (Refactoring redundant template literals)

Did you add tests for your changes?
No, as this is a minor syntax adjustment to a template literal within the HTML

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
N/A

Use of AI
GitHub Copilot

@alexander-akait alexander-akait merged commit 458c6a6 into webpack:main Mar 12, 2026
6 of 7 checks passed
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 12, 2026 4:28pm

Request Review

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

Successfully merging this pull request may close these issues.

Fix missing quotes in CSS <link> tags and refactor redundant template literals

2 participants