From eae0d134d92d83f733b85a8ecebf529a6e9799cf Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 27 Aug 2018 23:15:23 -0400 Subject: [PATCH] encode # on search --- dist/bundle.js | 5 ++++- src/redux/actions/search.js | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index e22c3dd..a792411 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -4346,7 +4346,10 @@ var doSearch = exports.doSearch = function doSearch(rawQuery) { data: { searchQuery: query } }); } - fetch('https://lighthouse.lbry.io/search?s=' + query + '&size=' + size + '&from=' + from).then(_handleFetch2.default).then(function (data) { + + // For some reason the app doesn't automatically encode the pound sign (#) + // If we don't do it manually everything after the '#' gets removed + fetch('https://lighthouse.lbry.io/search?s=' + query.replace('#', '%23') + '&size=' + size + '&from=' + from).then(_handleFetch2.default).then(function (data) { var uris = []; var actions = []; diff --git a/src/redux/actions/search.js b/src/redux/actions/search.js index eebeda4..2d48ced 100644 --- a/src/redux/actions/search.js +++ b/src/redux/actions/search.js @@ -45,7 +45,12 @@ export const doSearch = ( data: { searchQuery: query }, }); } - fetch(`https://lighthouse.lbry.io/search?s=${query}&size=${size}&from=${from}`) + + // For some reason the app doesn't automatically encode the pound sign (#) + // If we don't do it manually everything after the '#' gets removed + fetch( + `https://lighthouse.lbry.io/search?s=${query.replace('#', '%23')}&size=${size}&from=${from}` + ) .then(handleFetchResponse) .then(data => { const uris = [];