Skip to content

Commit

Permalink
Fix prevent mangling embedded strings in queries sent using the GET-m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
JoviDeCroock committed Aug 11, 2021
1 parent 3455401 commit b83e546
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-jobs-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@urql/core': patch
---

Fix prevent mangling embedded strings in queries sent using the `GET` method.
4 changes: 1 addition & 3 deletions packages/core/src/internal/fetchOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ export const makeFetchURL = (
if (body.query) {
search.push(
'query=' +
encodeURIComponent(
body.query.replace(/([\s,]|#[^\n\r]+)+/g, ' ').trim()
)
encodeURIComponent(body.query.replace(/#[^\n\r]+/g, ' ').trim())
);
}

Expand Down

0 comments on commit b83e546

Please sign in to comment.