From da90222053d4e0cd52a5fa756dd300908201b4b1 Mon Sep 17 00:00:00 2001 From: Derek Brown Date: Fri, 15 Jan 2021 17:14:34 -0500 Subject: [PATCH] fix: omitempty is not compatible with chardata xml encoding tag --- stanza/message.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stanza/message.go b/stanza/message.go index cb5410b..2a74a14 100644 --- a/stanza/message.go +++ b/stanza/message.go @@ -12,7 +12,7 @@ import ( type Subject struct { XMLName xml.Name `xml:"subject"` - Content string `xml:",chardata,omitempty"` + Content string `xml:",chardata"` Lang string `xml:"lang,attr,omitempty"` } @@ -20,7 +20,7 @@ type Subject struct { type Body struct { XMLName xml.Name `xml:"body"` - Content string `xml:",chardata,omitempty"` + Content string `xml:",chardata"` Lang string `xml:"lang,attr,omitempty"` }