From bff539cabf4300b6719cf2b78a18dcd5219163c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 6 Jul 2021 09:58:03 +0200 Subject: [PATCH] [FIX] tooling: make sure we escape content in release script --- tools/release.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/release.js b/tools/release.js index ddf685f1..5c0ab1f8 100644 --- a/tools/release.js +++ b/tools/release.js @@ -79,7 +79,8 @@ async function startRelease() { // --------------------------------------------------------------------------- log(`Step 4/${STEPS}: creating git commit...`); - const gitResult = await execCommand(`git commit -am "[REL] v${next}\n\n${content}"`); + const escapedContent = content.replace(/\"/g, '\\\"').replace(/\`/g, '\\\`'); + const gitResult = await execCommand(`git commit -am "[REL] v${next}\n\n${escapedContent}"`); if (gitResult !== 0) { logError("Git commit failed. Aborting."); return;