Skip to content

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.

@changeset-bot
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
@codspeed-hq
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
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
* fix(svg): prevent empty attributes

* create changeset

* bump ultrahtml instead

Co-authored-by: ematipico <[email protected]>
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