B #5914: fix double lines

Signed-off-by: Pierre Lafievre <pierre.lafievre@iguanesolutions.com>
This commit is contained in:
Pierre Lafievre committed 2022-08-09 15:58:16 +02:00
1 parent 39a4108e32
commit df3f44d68d
1 file changed
+3 -2
+3 -2
View File
@@ -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()