From 995f2d137373564b4f58886e7ec725de3c47548a Mon Sep 17 00:00:00 2001 From: jokimina Date: Thu, 24 Mar 2022 19:32:41 +0800 Subject: [PATCH] Update dyntemplate.go fix escape (cherry picked from commit 92d78bbbdf8b08c57fdc7ccc3dac2730f3b7a81b) --- src/oca/go/src/goca/dynamic/dyntemplate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oca/go/src/goca/dynamic/dyntemplate.go b/src/oca/go/src/goca/dynamic/dyntemplate.go index 5edec5fc521..4a321f01792 100644 --- a/src/oca/go/src/goca/dynamic/dyntemplate.go +++ b/src/oca/go/src/goca/dynamic/dyntemplate.go @@ -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 {