Merge pull request #134 from lbryio/ignore_lbry_urls

added removal from query `lbry://` ( lbry urls )
This commit is contained in:
Mark 2018-11-12 21:56:27 -05:00 committed by GitHub
commit 497beeed60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -317,7 +317,7 @@ function getStatus () {
function getWashedQuery (query) {
// compress multiple white spaces to 1
query = query.toLowerCase().replace(/ +/g, ' ');
query = query.toLowerCase().replace(/ +/g, ' ').replace('lbry://', '');
let splitBy = ['&', '$', ' '];
let regex = new RegExp(splitBy.join('|'), 'gi');
let badWords = [ 'from', 'with', 'not', 'can', 'all', 'are', 'for', 'but', 'and', 'the' ];