summaryrefslogtreecommitdiffhomepage
path: root/replacer_test.go
diff options
context:
space:
mode:
authorAziz Rmadi <[email protected]>2024-01-13 14:24:03 -0600
committerGitHub <[email protected]>2024-01-13 20:24:03 +0000
commit80acf1bf23890697a12e25f84ae2c6520633da6f (patch)
tree0bfd9a7bc242bd07d99dbf9e2f98452dd9335e30 /replacer_test.go
parentc839a98ff527932fd14460829142c486f4531a7b (diff)
downloadcaddy-80acf1bf23890697a12e25f84ae2c6520633da6f.tar.gz
caddy-80acf1bf23890697a12e25f84ae2c6520633da6f.zip
replacer: Fix escaped closing braces (#5995)
Diffstat (limited to 'replacer_test.go')
-rw-r--r--replacer_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/replacer_test.go b/replacer_test.go
index 41ada7d6d..c88683947 100644
--- a/replacer_test.go
+++ b/replacer_test.go
@@ -69,7 +69,7 @@ func TestReplacer(t *testing.T) {
},
{
input: `\}`,
- expect: `\}`,
+ expect: `}`,
},
{
input: "{}",
@@ -164,6 +164,10 @@ func TestReplacer(t *testing.T) {
input: string([]byte{0x26, 0x00, 0x83, 0x7B, 0x84, 0x07, 0x5C, 0x7D, 0x84}),
expect: string([]byte{0x26, 0x00, 0x83, 0x7B, 0x84, 0x07, 0x7D, 0x84}),
},
+ {
+ input: `\\}`,
+ expect: `\}`,
+ },
} {
actual := rep.ReplaceAll(tc.input, tc.empty)
if actual != tc.expect {