From 0627a0c8530895e394eecd9864f679de0da8d10a Mon Sep 17 00:00:00 2001 From: Elizabeth Cray Date: Thu, 8 Sep 2022 00:17:25 +0000 Subject: [PATCH] Changed to ReplaceAll --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2ccb6c2..69ed8b0 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ const invalidChars = ['/', '\\', '>', '<', ':', '*', '|', '"', '\'', '?', '\0']; const replaceInvalid = (str) => { var cache = str; invalidChars.forEach(ch => { - cache = cache.replace(ch, "#"); + cache = cache.replaceAll(ch, "#"); }); return cache; }