From c2253463300587cc7d2e2e84a6119119750e306a Mon Sep 17 00:00:00 2001 From: oilcake Date: Sun, 1 Jan 2023 16:54:27 +0300 Subject: [PATCH] Update string.lua Symbol "&" was missing in replace pattern, it can be interpreted as a command. If the function was meant to correctly escape paths it should be escaped too. --- lib/std/string.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/string.lua b/lib/std/string.lua index 6ad9014..2c6f956 100644 --- a/lib/std/string.lua +++ b/lib/std/string.lua @@ -133,7 +133,7 @@ end local function escape_shell(s) - return(gsub(s, '([ %(%)%\\%[%]\'"])', '\\%1')) + return(gsub(s, '([ %(%)%\\%[%]\'"&])', '\\%1')) end