1
0
mirror of https://github.com/gogf/gf.git synced 2025-04-05 03:05:05 +08:00

fix(util/gutil): code scanning alert no. 17: Potentially unsafe quoting (#3993)

This commit is contained in:
houseme 2024-12-01 23:44:48 +08:00 committed by GitHub
parent 5aa7504bb2
commit 42eae41599
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -465,6 +465,7 @@ func doDumpDefault(in doDumpInternalInput) {
func addSlashesForString(s string) string {
return gstr.ReplaceByMap(s, map[string]string{
`"`: `\"`,
`'`: `\'`,
"\r": `\r`,
"\t": `\t`,
"\n": `\n`,