encode # on search #73

Merged
neb-b merged 1 commit from pound-trim into master 2018-08-28 23:14:15 +02:00
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 = [];