mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser/graphite: use Regex.ReplaceAllLiteralString instead of Regex.ReplaceAllString for the case when the replacement cannot contain placeholders for capturing groups
This is a follow-up for 74affa3aec
This commit is contained in:
parent
74affa3aec
commit
8ff051b287
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ func stripLeadingWhitespace(s string) string {
|
||||||
|
|
||||||
var sanitizer = bytesutil.NewFastStringTransformer(func(s string) string {
|
var sanitizer = bytesutil.NewFastStringTransformer(func(s string) string {
|
||||||
// Apply rule to drop some chars to preserve backwards compatibility
|
// Apply rule to drop some chars to preserve backwards compatibility
|
||||||
s = repeatedDots.ReplaceAllString(s, ".")
|
s = repeatedDots.ReplaceAllLiteralString(s, ".")
|
||||||
|
|
||||||
// Replace any remaining illegal chars
|
// Replace any remaining illegal chars
|
||||||
return allowedChars.ReplaceAllLiteralString(s, "_")
|
return allowedChars.ReplaceAllLiteralString(s, "_")
|
||||||
|
|
Loading…
Reference in a new issue