-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow-up to [#461][] While the changes made in #461 added coverage for `<form method="post" action="...">` and `<form>` submissions, it didn't cover `<form action="/?encoded=value">` submissions with search parameters encoded into the `[action]` attribute. Without Turbo or any other JavaScript, submitting a form with an `[action]` value that contains query parameters requests that `[action]` path without any key-value pairs (that is, with `?` as its the value of `URL.search`): ```html <form action="/src/tests/fixtures/form.html?sort=asc"> <!-- clicking the button navigates to `/src/tests/fixtures/form?` --> <button>Submit</button> </form> ``` This commit modifies the `FetchRequest` to always invoke the module-private `mergeFormDataEntries()` function when constructing `GET` requests, and modifies the `mergeFormDataEntries()` to completely discard the `[action]` URL's search parameters before merging-in the `FormData` key-value pairs. [#461]: #461
- Loading branch information
1 parent
b88bb24
commit aa61e6a
Showing
3 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters