Skip to content

Conversation

gwennlbh
Copy link

@gwennlbh gwennlbh commented Oct 1, 2025

Changes

Makes findRouteToRewrite compare routes' href against the encoded result (target) path, instead of the decoded one, since hrefs are encoded

Closes #14464

Testing

Not done yet. Waiting on feedback on the issue to see if this diff is okay before writing a test

Docs

Doesn't affect docs since it's just a bug fix for what was a unexpected behavior of Astro.rewrite

Copy link

changeset-bot bot commented Oct 1, 2025

🦋 Changeset detected

Latest commit: 6cff47c

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 Oct 1, 2025
@gwennlbh gwennlbh force-pushed the fix-non-ascii-rewrites branch from 676517e to c3af294 Compare October 1, 2025 15:43
Copy link

codspeed-hq bot commented Oct 1, 2025

CodSpeed Performance Report

Merging #14467 will not alter performance

Comparing gwennlbh:fix-non-ascii-rewrites (6cff47c) with main (3a3a7fe)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on main (e292758) during the generation of this report, so 3a3a7fe was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@florian-lefebvre
Copy link
Member

Hi! Do you need any help? I believe adding a test should be enough to make this PR ready

@gwennlbh
Copy link
Author

hello! sorry, I got a bit busy haha

what kind of tests would be appropriate here? i guess E2E, unit too? do I have to make a new test or do I add a case in an existing one ?

@florian-lefebvre
Copy link
Member

No problem! I'm not 100% sure, probably a unit test and an integration test if you don't mind

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.

Astro.rewrite wrongly renders 404s when rewriting to a URL with non-ASCII characters

2 participants