oops that was an injection vector!

Former-commit-id: c0aeda6e6f83c840a4a432c942de9d88aafc8a22
This commit is contained in:
Ben
2022-04-15 23:43:44 +01:00
parent 9f508767fd
commit ed5279c7c9
2 changed files with 18 additions and 3 deletions

View File

@@ -50,7 +50,12 @@ function LevenshteinDistance(s, t) {
return d[n][m];
}
function SanatiseQuery(query) {
return query.replace(/[^a-zA-Z0-9 ]/g, '').toLowerCase();
}
module.exports = {
SanatiseQuery,
LevenshteinDistance,
ResultsPerPage: 16,
};