escape quote on parameters

This commit is contained in:
Celogeek 2021-12-23 20:02:01 +01:00
parent 91c2e5b85a
commit a3bdfe66c1
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A

View File

@ -34,7 +34,7 @@ func ArgsToForm(args []string) (*url.Values, error) {
if len(r) != 2 { if len(r) != 2 {
return nil, errors.New("args should be key=value") return nil, errors.New("args should be key=value")
} }
params.Add(r[0], r[1]) params.Add(r[0], strings.ReplaceAll(r[1], "'", `\'`))
} }
return params, nil return params, nil
} }