diff --git a/core/.eslintrc.jquery.json b/core/.eslintrc.jquery.json index def86d7efff391f7f95e8f538c8f66774f77b288..b9d3a86d5248fb9d42c908ec75c0a388d3106da5 100644 --- a/core/.eslintrc.jquery.json +++ b/core/.eslintrc.jquery.json @@ -39,7 +39,7 @@ "jquery/no-prop": 0, "jquery/no-proxy": 2, "jquery/no-ready": 2, - "jquery/no-serialize": 0, + "jquery/no-serialize": 2, "jquery/no-show": 0, "jquery/no-size": 2, "jquery/no-sizzle": 0, diff --git a/core/misc/form.js b/core/misc/form.js index 3256a17fd82c8f2c9345e089b0631f3eff8012ba..991241323346d737e6f194d7653e5a098da27935 100644 --- a/core/misc/form.js +++ b/core/misc/form.js @@ -125,7 +125,9 @@ attach() { function onFormSubmit(e) { const $form = $(e.currentTarget); - const formValues = $form.serialize(); + const formValues = new URLSearchParams( + new FormData(e.target), + ).toString(); const previousValues = $form.attr('data-drupal-form-submit-last'); if (previousValues === formValues) { e.preventDefault();