From 439859bac95d8c6462e2b5ca9fc40af3dcf8aeed Mon Sep 17 00:00:00 2001 From: TheFakeElon <59686430+TheFakeElon@users.noreply.github.com> Date: Sat, 13 Nov 2021 18:20:36 +1100 Subject: [PATCH] Protects filename regex global (#62710) --- code/_globalvars/regexes.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/_globalvars/regexes.dm b/code/_globalvars/regexes.dm index 6f5205686af..7e571576213 100644 --- a/code/_globalvars/regexes.dm +++ b/code/_globalvars/regexes.dm @@ -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.