2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Sanitize search input (#3591)

* Sanitize search input

- Remove ASCII and unicode control characters

* js linting

* Simplified regex

* Sanitize modal form fields also
This commit is contained in:
Oliver
2022-08-24 11:57:53 +10:00
committed by GitHub
parent 12509203d6
commit 528da731f2
3 changed files with 30 additions and 1 deletions

View File

@ -98,7 +98,9 @@ var searchQueries = [];
function searchTextChanged(event) {
searchText = $('#offcanvas-search').find('#search-input').val();
var text = $('#offcanvas-search').find('#search-input').val();
searchText = sanitizeInputString(text);
clearTimeout(searchInputTimer);
searchInputTimer = setTimeout(updateSearch, 250);