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; }