Skip to content

Commit

Permalink
Update addproperty.go
Browse files Browse the repository at this point in the history
  • Loading branch information
brugnara authored Dec 12, 2019
1 parent 65ff4bf commit 7bfd869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query/traversal/addproperty.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (g String) Property(objOrCard interface{}, obj interface{}, params ...inter

switch obj.(type) {
case string:
g = g.append(",\"" + obj.(string) + "\"")
g = g.append(",\"" + strings.ReplaceAll(obj.(string), "\"", "\\\"") + "\"")
default:
g = g.append(fmtStr(",%v", obj))
}
Expand All @@ -56,7 +56,7 @@ func (g String) Property(objOrCard interface{}, obj interface{}, params ...inter
for _, p := range params {
switch obj.(type) {
case string:
g = g.append(",\"" + p.(string) + "\"")
g = g.append(",\"" + strings.ReplaceAll(p.(string), "\"", "\\\"") + "\"")
default:
g = g.append(fmtStr(",%v", p))
}
Expand Down

0 comments on commit 7bfd869

Please sign in to comment.