Fix double slash normalization for useNavigate paths with colons#14718
Fix double slash normalization for useNavigate paths with colons#14718brophdawg11 merged 2 commits intodevfrom
useNavigate paths with colons#14718Conversation
🦋 Changeset detectedLatest commit: 0571de6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
| if (toPathname) { | ||
| if (isAbsoluteUrl(toPathname)) { | ||
| pathname = toPathname; | ||
| toPathname = toPathname.replace(/\/\/+/g, "/"); |
There was a problem hiding this comment.
We didn't need to be checking for absolute URLs at all here before. resolvePath is only intended to manage pathnames/search/hash - absolute navigations are handled outside of here by Link so we can just always do the double slash replacement here.
./
#14711
845c467 to
fbd3ef8
Compare
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
…emix-run#14718) * Fix double slash normalization or useNavigate colon paths * Add test
Closes #14711
This is a rework of the solution from #14529 that removes the absolute path check because
resolvePathdoesn't need to handle absolute URLs.