Fixed xml decode bug when there is content after a comment

This commit is contained in:
Mike Farah
2022-11-25 13:21:19 +11:00
parent 51043770bf
commit 43233ce62e
3 changed files with 6 additions and 17 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ func (dec *xmlDecoder) decodeXML(root *xmlNode) error {
}
case xml.CharData:
// Extract XML data (if any)
elem.n.Data = trimNonGraphic(string(se))
elem.n.Data = elem.n.Data + trimNonGraphic(string(se))
if elem.n.Data != "" {
elem.state = "chardata"
log.Debug("chardata [%v] for %v", elem.n.Data, elem.label)