From 4fbeecbc762fe5cda050aae7bb7e51fec3f91fe0 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Wed, 18 Sep 2024 06:54:15 +0800 Subject: [PATCH] OPDS: resolve bare search template URL in feed Fixes #1401 --- src/opds/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opds/main.js b/src/opds/main.js index e1595743..cd1a7ea3 100644 --- a/src/opds/main.js +++ b/src/opds/main.js @@ -564,8 +564,8 @@ const renderFeed = async (feed, baseURL) => { else if (atomSearch) renderSearch({ metadata: { title: atomSearch.title }, // NOTE: no full OpenSearch support here - search: map => atomSearch.href.replaceAll('{searchTerms}', - encodeURIComponent(map.get(null).get('searchTerms'))), + search: map => resolveURL(atomSearch.href.replaceAll('{searchTerms}', + encodeURIComponent(map.get(null).get('searchTerms'))), baseURL), params: [{ name: 'searchTerms' }], }) }