From adbd88aa798fca58242afc95989031b27fdb4a98 Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Fri, 12 Apr 2024 17:26:53 -0400 Subject: [PATCH] only strip quotes from subcommand if they are at both ends --- public/scripts/variables.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/scripts/variables.js b/public/scripts/variables.js index 81ecce313..3f154056c 100644 --- a/public/scripts/variables.js +++ b/public/scripts/variables.js @@ -510,12 +510,8 @@ function evalBoolean(rule, a, b) { * @returns {Promise} Pipe result */ async function executeSubCommands(command, scope = null) { - if (command.startsWith('"')) { - command = command.slice(1); - } - - if (command.endsWith('"')) { - command = command.slice(0, -1); + if (command.startsWith('"') && command.endsWith('"')) { + command = command.slice(1, -1); } const result = await executeSlashCommands(command, true, scope);