summaryrefslogtreecommitdiff
path: root/vendor/codeberg.org/gruf/go-kv/format/format.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-08-13 14:27:29 +0100
committerLibravatar GitHub <noreply@github.com>2023-08-13 14:27:29 +0100
commit8ea7f551a094c3cecbdd58e9d867ef19c0c547d7 (patch)
treeeb501c8914c25dba21dbbffa8dc4302fd66a30ec /vendor/codeberg.org/gruf/go-kv/format/format.go
parent[bugfix] CSP policy fixes for S3/object storage (#2104) (diff)
downloadgotosocial-8ea7f551a094c3cecbdd58e9d867ef19c0c547d7.tar.xz
[bugfix] bump go-kv version with logfmt quote fix (#2108)
Diffstat (limited to 'vendor/codeberg.org/gruf/go-kv/format/format.go')
-rw-r--r--vendor/codeberg.org/gruf/go-kv/format/format.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-kv/format/format.go b/vendor/codeberg.org/gruf/go-kv/format/format.go
index ab20e01f4..5027c7c06 100644
--- a/vendor/codeberg.org/gruf/go-kv/format/format.go
+++ b/vendor/codeberg.org/gruf/go-kv/format/format.go
@@ -316,7 +316,9 @@ func (f format) AppendStringSafe(s string) {
f.Buffer.B = strconv.AppendQuote(f.Buffer.B, s)
} else if ContainsDoubleQuote(s) {
// Contains double quotes, needs escaping
+ f.Buffer.B = append(f.Buffer.B, '"')
f.Buffer.B = AppendEscape(f.Buffer.B, s)
+ f.Buffer.B = append(f.Buffer.B, '"')
} else if len(s) == 0 || ContainsSpaceOrTab(s) {
// Contains space / empty, needs quotes
f.Buffer.B = append(f.Buffer.B, '"')