From e7750e02e69353078f87c913a73b204aaa597eb6 Mon Sep 17 00:00:00 2001 From: keewis Date: Mon, 15 Mar 2021 19:13:16 +0100 Subject: [PATCH] properly escape the output (#2) * use tr * replace " with %22 * print the commit message and the escaped message * use sed instead * escape the commit message before setting it as an output --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 8765f6b..b304a4b 100644 --- a/script.sh +++ b/script.sh @@ -42,5 +42,5 @@ fi echo "keyword detected: $result" echo "::endgroup::" -echo "::set-output name=COMMIT_MESSAGE::$commit_message" +echo "::set-output name=COMMIT_MESSAGE::$(echo $commit_message | sed 's/\"/\\"/g')" echo "::set-output name=CI_TRIGGERED::$result"