Commit 339c5d43 authored by Clement Ho's avatar Clement Ho

Sanitize spaces in search term

parent d0165c82
......@@ -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 = {}));
\ No newline at end of file
})(window.gl || (window.gl = {}));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment