Skip to content

Commit

Permalink
Fix potentially unsafe quoting
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
weiihann committed Sep 26, 2024
1 parent 5e1c370 commit e9692e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ToPythonicJSON(input string) (string, error) {
nextChar := runes[i+1]
if nextChar == 'u' && i+5 < len(runes) {
unicodeSeq := string(runes[i : i+6])
r, err := strconv.Unquote(`"` + unicodeSeq + `"`)
r, err := strconv.Unquote("\"" + unicodeSeq + "\"")
if err != nil {
return "", err
}
Expand Down

0 comments on commit e9692e2

Please sign in to comment.