From b3f21184c6d1a9078a66432860fa17e4e4780818 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sat, 16 Apr 2022 21:22:17 +0200 Subject: [PATCH] Problem: + in query is replace by space Solution: encode url for search request --- src/store.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/store.js b/src/store.js index 7cca7cb..7f74e10 100644 --- a/src/store.js +++ b/src/store.js @@ -265,7 +265,11 @@ export default new Vuex.Store({ if (state.channel !== null && state.channel.uid !== null && state.channel.uid !== 'home') { channel = state.channel.uid } - return fetch(this.state.microsubEndpoint + '?action=search&channel='+channel+'&query='+query, { + const url = new URL(this.state.microsubEndpoint) + url.searchParams.set('action', 'search') + url.searchParams.set('channel', channel) + url.searchParams.set('query', query) + return fetch(url.toString(), { headers: { 'Authorization': 'Bearer ' + this.state.access_token },