From 27bf517478b548b54096f52cc0cbb366dd34591b Mon Sep 17 00:00:00 2001 From: Artur Klamborowski Date: Thu, 15 Apr 2021 12:50:28 +0200 Subject: [PATCH] Replace quotes with single quote --- step.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/step.sh b/step.sh index b74d73e..993e5a7 100755 --- a/step.sh +++ b/step.sh @@ -92,7 +92,12 @@ echo "${blue}✉️ Comment:${cyan}" echo "$jira_comment" echo "${reset}" -escaped_jira_comment=$(echo "$jira_comment" | perl -pe 's/\n/\\n/g' | sed 's/.\{2\}$//') +escaped_jira_comment=$(echo "$jira_comment" | perl -pe 's/\n/\\n/g' | sed 's/"/'\''/' | sed 's/.\{2\}$//') + + +echo "${blue}✉️ Escaped comment:${cyan}" +echo "$escaped_jira_comment" +echo "${reset}" create_comment_data() {