Skip to content

Commit

Permalink
OPDS: resolve bare search template URL in feed
Browse files Browse the repository at this point in the history
Fixes #1401
  • Loading branch information
johnfactotum committed Sep 17, 2024
1 parent c9de12c commit 4fbeecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opds/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }],
})
}
Expand Down

0 comments on commit 4fbeecb

Please sign in to comment.