From 76a0254a1df106235839b11a20a23c0e7b2da29a Mon Sep 17 00:00:00 2001 From: A_D Date: Sat, 17 Nov 2018 16:55:50 +0200 Subject: [PATCH] made sure to strip carriage returns from comment bodies --- webhooks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webhooks.go b/webhooks.go index fa4bede..fe3a86f 100644 --- a/webhooks.go +++ b/webhooks.go @@ -114,6 +114,7 @@ func handleIssueComment(data []byte) { ) fmt.Printf(INDENT + "---\n") - msg := strings.Replace(action.Comment.Body, "\n", strings.Repeat(INDENT, 2) + "\n", -1) + stripped := strings.Replace(action.Comment.Body, "\r", "", -1) + msg := strings.Replace(stripped, "\n", strings.Repeat(INDENT, 2) + "\n", -1) fmt.Printf(strings.Repeat(INDENT, 2) + msg) }