encode # on search

This commit is contained in:
Sean Yesmunt 2018-08-27 23:15:23 -04:00
parent feffbe966f
commit eae0d134d9
2 changed files with 10 additions and 2 deletions

5
dist/bundle.js vendored
View file

@ -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 = [];

View file

@ -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 = [];