Skip to content

Commit

Permalink
fix: fix encoding/matching issues with special chars (#9477)
Browse files Browse the repository at this point in the history
* fix: fix encoding/matching issues with special chars

* add changeset

* Bump bundle
  • Loading branch information
brophdawg11 committed Oct 21, 2022
1 parent 8f684eb commit 80d5844
Show file tree
Hide file tree
Showing 6 changed files with 759 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/hot-badgers-grow.md
@@ -0,0 +1,6 @@
---
"react-router-dom": patch
"@remix-run/router": patch
---

fix encoding/matching issues with special chars
Expand Up @@ -12,6 +12,7 @@ import {
describe("navigate with params", () => {
let node: HTMLDivElement;
beforeEach(() => {
global.history.pushState({}, "", "/");
node = document.createElement("div");
document.body.appendChild(node);
});
Expand Down Expand Up @@ -88,7 +89,8 @@ describe("navigate with params", () => {
let pathname = window.location.pathname.replace(/%20/g, "+");
expect(pathname).toEqual("/blog/react+router");

expect(node.innerHTML).toMatch(/react router/);
// Note decodeURIComponent doesn't decode +
expect(node.innerHTML).toMatch(/react\+router/);
});
});
});

0 comments on commit 80d5844

Please sign in to comment.