From e38df646160fd862593e2226a77001e9db47cdaa Mon Sep 17 00:00:00 2001 From: pleimer <41337120+pleimer@users.noreply.github.com> Date: Tue, 13 Oct 2020 16:57:52 -0400 Subject: [PATCH] use literal string replacement rather than expansion (#94) Co-authored-by: pleimer --- internal/pkg/events/incoming/ceilometer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/events/incoming/ceilometer.go b/internal/pkg/events/incoming/ceilometer.go index e7d3a29..e3c8905 100644 --- a/internal/pkg/events/incoming/ceilometer.go +++ b/internal/pkg/events/incoming/ceilometer.go @@ -105,7 +105,7 @@ func (evt *CeilometerEvent) sanitize(jsondata string) string { // avoid getting payload data wrapped in array item := rexForPayload.FindStringSubmatch(sanitized) if len(item) == 2 { - sanitized = rexForPayload.ReplaceAllString(sanitized, fmt.Sprintf(`"payload":%s`, item[1])) + sanitized = rexForPayload.ReplaceAllLiteralString(sanitized, fmt.Sprintf(`"payload":%s`, item[1])) } return sanitized }