From a666f956f4d22f678d1c11d5d00326514aea4f8e Mon Sep 17 00:00:00 2001 From: slegarraga <64795732+slegarraga@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:05:09 -0300 Subject: [PATCH] fix: escape vertical bar character in cURL (CMD) request snippets The pipe character | was not being escaped in CMD curl snippets, causing Windows cmd.exe to interpret it as a command separator. Added .replace(/\|/g, "^|") to the escapeCMD function, which escapes | with a caret (^) following CMD escaping conventions. Fixes #10540 --- src/core/plugins/request-snippets/fn.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/plugins/request-snippets/fn.js b/src/core/plugins/request-snippets/fn.js index aea7c215657..f9f563d2389 100644 --- a/src/core/plugins/request-snippets/fn.js +++ b/src/core/plugins/request-snippets/fn.js @@ -33,6 +33,7 @@ const escapeCMD = (str) => { .replace(/\^/g, "^^") .replace(/\\"/g, "\\\\\"") .replace(/"/g, "\"\"") + .replace(/\|/g, "^|") .replace(/\n/g, "^\n") if (str === "-d ") { return str