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(svg): prevent empty attributes #13545

Merged
merged 3 commits into from
Apr 4, 2025
Merged

Conversation

stramel
Copy link
Contributor

@stramel stramel commented Apr 3, 2025

Changes

Updating to the latest 1.6.0 which fixes the issue and brings in some optimizations to the regexes it uses.
Fixes #13496

Testing

Added a test to assert that there were no empty attributes ="" in the resultant html with an SVG known to produce it.

Docs

Not necessary as this is just a bug fix.

Copy link

changeset-bot bot commented Apr 3, 2025

🦋 Changeset detected

Latest commit: b366883

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 the pkg: astro Related to the core `astro` package (scope) label Apr 3, 2025
Copy link

codspeed-hq bot commented Apr 3, 2025

CodSpeed Performance Report

Merging #13545 will not alter performance

Comparing stramel:fix-empty-attrs (991ad8a) with main (d777420)

Summary

✅ 6 untouched benchmarks

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you @stramel , can you please add a changeset?

@stramel stramel requested a review from ematipico April 3, 2025 14:22
@stramel stramel requested a review from ematipico April 4, 2025 05:54
@stramel
Copy link
Contributor Author

stramel commented Apr 4, 2025

@ematipico please take another look at these changes. Verified the fix on ultrahtml side and the test still passes

@ematipico ematipico merged commit a7aff41 into withastro:main Apr 4, 2025
14 of 15 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Apr 4, 2025
@stramel stramel deleted the fix-empty-attrs branch April 4, 2025 14:56
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.

Experimental SVG imports can generate invalid SVG code on site build
2 participants