From e94487d0e0bc1968c5272e265039771b723997fb Mon Sep 17 00:00:00 2001 From: Matt Creaser Date: Mon, 10 Mar 2025 09:09:32 -0300 Subject: [PATCH] Remove special characters before calling xargs in notify comment --- .github/workflows/issue_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index d5a2487baa..dcbeaca6b4 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -17,7 +17,7 @@ jobs: COMMENT_URL: ${{ github.event.comment.html_url }} USER: ${{ github.event.comment.user.login }} shell: bash - run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' + run: echo $BODY | sed "s/\\\n/. /g; s/\\\r//g; s/[^a-zA-Z0-9 &().,:]//g" | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' adjust-labels: runs-on: ubuntu-latest