From 23b83144a84388a1366cf54c3f870a0053daec12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 30 Jan 2023 02:45:56 +0100 Subject: [PATCH] web: fix search with spaces --- public/partdb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/partdb.js b/public/partdb.js index 77fee7b..2e52dbd 100644 --- a/public/partdb.js +++ b/public/partdb.js @@ -25,8 +25,8 @@ function search() let xhr = new XMLHttpRequest(); xhr.open('GET', last_search, true); xhr.onload = function() { - if (this.responseURL.endsWith(last_search)) { - parts = JSON.parse(this.response) + if (decodeURI(this.responseURL).endsWith(last_search)) { + parts = JSON.parse(this.response); results(); } };