2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Clean extra non-printable chars (#4110)

- \x00 (null character)
- \x7F (DEL character)
This commit is contained in:
Oliver
2022-12-26 23:49:55 +11:00
committed by GitHub
parent 95dc78a61f
commit bc6b232d7c
2 changed files with 3 additions and 3 deletions

View File

@ -456,7 +456,7 @@ function sanitizeInputString(s, options={}) {
}
// Remove ASCII control characters
s = s.replace(/[\x01-\x1F]+/g, '');
s = s.replace(/[\x00-\x1F\x7F]+/g, '');
// Remove Unicode control characters
s = s.replace(/[\p{C}]+/gu, '');