diff --git a/lib/repl/repl-search.js b/lib/repl/repl-search.js index 84885f65a..00fd7d42f 100644 --- a/lib/repl/repl-search.js +++ b/lib/repl/repl-search.js @@ -47,7 +47,8 @@ function isCtrlR(k) { } function isControlChar(c) { - return /[\x00-\x1F]/.test(c); + const code = c.charCodeAt(0); + return code >= 0 && code <= 31; } function search(query, repl, next) {