Merge pull request #73 from lbryio/pound-trim

encode # on search
This commit is contained in:
Sean Yesmunt 2018-08-28 17:14:15 -04:00 committed by GitHub
commit 421321a783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 = [];