aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/xml/marshal.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/xml/marshal.go')
-rw-r--r--src/pkg/xml/marshal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/xml/marshal.go b/src/pkg/xml/marshal.go
index f6e5bf5cdb..ea421c1b17 100644
--- a/src/pkg/xml/marshal.go
+++ b/src/pkg/xml/marshal.go
@@ -177,7 +177,7 @@ func (p *printer) marshalValue(val reflect.Value, name string) os.Error {
case "":
case "chardata":
if tk := f.Type.Kind(); tk == reflect.String {
- p.Write([]byte(val.Field(i).String()))
+ Escape(p, []byte(val.Field(i).String()))
} else if tk == reflect.Slice {
if elem, ok := val.Field(i).Interface().([]byte); ok {
Escape(p, elem)