1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Update dyntemplate.go

fix escape

(cherry picked from commit 92d78bbbdf8b08c57fdc7ccc3dac2730f3b7a81b)
(cherry picked from commit 995f2d137373564b4f58886e7ec725de3c47548a)
This commit is contained in:
jokimina 2022-03-24 19:32:41 +08:00 committed by Ruben S. Montero
parent 47c1c3e372
commit f3f1803d7a
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -74,7 +74,7 @@ func (t *Template) String() string {
// String prints a Pair in OpenNebula syntax
func (p *Pair) String() string {
return fmt.Sprintf("%s=\"%s\"", p.XMLName.Local, p.Value)
return fmt.Sprintf("%s=%s", p.XMLName.Local, strconv.Quote(p.Value))
}
func (v *Vector) String() string {