Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
use literal string replacement rather than expansion (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: pleimer <[email protected]>
  • Loading branch information
pleimer and pleimer authored Oct 13, 2020
1 parent a68b8b5 commit e38df64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/events/incoming/ceilometer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e38df64

Please sign in to comment.