From 6bad4ff48e258d9c74085221339698bfd3ea3b98 Mon Sep 17 00:00:00 2001 From: Linas Ramanauskas Date: Tue, 24 Oct 2023 23:44:24 +0300 Subject: [PATCH] Fixes slug generation for values containing ampersand symbol --- src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js b/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js index 2f09806f1..d0a8cb4d1 100644 --- a/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js +++ b/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js @@ -79,7 +79,7 @@ export class HandleSlugUpdate { async _getValidSlug(url, value) { try { - const request = await fetch(`${url}?name=${value}`); + const request = await fetch(`${url}?name=${encodeURIComponent(value)}`); const response = await request.json(); return response.slug; } catch (error) {