Skip to content

Commit d510209

Browse files
authored
fix: tighten up the character set that will be removed (#93)
the original implementation was wrong, the documented disallowed characters are 0-31 not \x00-\x31
1 parent 6493397 commit d510209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/escape.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const sh = (input) => {
6868
// disabling the no-control-regex rule for this line as we very specifically _do_ want to
6969
// replace those characters if they somehow exist at this point, which is highly unlikely
7070
// eslint-disable-next-line no-control-regex
71-
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x31]/g, '')
71+
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x1F]/g, '')
7272

7373
module.exports = {
7474
cmd,

0 commit comments

Comments
 (0)