From 3b02b4494f81f8b1424d7fb8c9106f8955d1c85c Mon Sep 17 00:00:00 2001 From: Markus Winter Date: Mon, 6 May 2024 16:27:08 +0200 Subject: [PATCH] use URLSearchParams --- war/src/main/js/components/search-box/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/war/src/main/js/components/search-box/index.js b/war/src/main/js/components/search-box/index.js index 66b3b2ce1e18..a36f4986de6e 100644 --- a/war/src/main/js/components/search-box/index.js +++ b/war/src/main/js/components/search-box/index.js @@ -41,7 +41,8 @@ function init() { comp.appendChild(ul); async function dataSrc(val) { - let url = searchURL + "suggest?query=" + val; + const params = new URLSearchParams({ query: val }); + let url = searchURL + "suggest?" + params; const result = await fetch(url); const data = await result.json(); const list = [];