Sanitize spaces in search term

This commit is contained in:
Clement Ho 2016-11-08 11:35:28 -06:00
parent d0165c8287
commit 339c5d4326
1 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,9 @@
const sanitizedKey = key.slice(0, key.indexOf('_'));
inputValue += `${sanitizedKey}:${value} `;
} else if (!match && key === 'search') {
inputValue += `${value} `;
// Sanitize value as URL converts spaces into %20
const sanitizedValue = value.replace('%20', ' ');
inputValue += `${sanitizedValue} `;
}
});
@ -139,4 +141,4 @@
}
global.FilteredSearchManager = FilteredSearchManager;
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));