Protects filename regex global (#62710)

This commit is contained in:
TheFakeElon
2021-11-12 23:20:36 -08:00
committed by GitHub
parent cb9e8ba924
commit 439859bac9
+1
View File
@@ -15,4 +15,5 @@ GLOBAL_DATUM_INIT(angular_brackets, /regex, regex(@"[<>]", "g"))
//All characters forbidden by filenames: ", \, \n, \t, /, ?, %, *, :, |, <, >, ..
GLOBAL_DATUM_INIT(filename_forbidden_chars, /regex, regex(@{""|[\\\n\t/?%*:|<>]|\.\."}, "g"))
GLOBAL_PROTECT(filename_forbidden_chars)
// had to use the OR operator for quotes instead of putting them in the character class because it breaks the syntax highlighting otherwise.