Skip to content

Commit

Permalink
B OpenNebula#5914: fix double lines
Browse files Browse the repository at this point in the history
  • Loading branch information
treywelsh committed Aug 9, 2022
1 parent 53b7400 commit 75c108f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/oca/go/src/goca/dynamic/dyntemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ func (p *Pair) String() string {
} else {
buf := bytes.NewBufferString(p.XMLName.Local)
buf.WriteString("=\"")
buf.WriteString(strings.ReplaceAll(p.Value, `"`, `\"`))
buf.WriteString(strings.ReplaceAll(p.Value, `\`, `\\`))
newValue := strings.ReplaceAll(p.Value, `"`, `\"`)
newValue = strings.ReplaceAll(newValue, `\`, `\\`)
buf.WriteString(newValue)
buf.WriteByte('"')

return buf.String()
Expand Down

0 comments on commit 75c108f

Please sign in to comment.