From 28f5616f766b2b0dfccde6b7bafb6268caf555f6 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Thu, 17 Oct 2024 17:14:10 +0200 Subject: [PATCH] Make uri in id and text in plain text xml type ",chardata" --- id.go | 2 +- plainText.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/id.go b/id.go index c3eb376..ca64c53 100644 --- a/id.go +++ b/id.go @@ -7,7 +7,7 @@ import ( type ID struct { *CommonAttributes - URI IRI `xml:"uri"` + URI IRI `xml:",chardata"` } // NewID creates a new ID. It returns a *ID. diff --git a/plainText.go b/plainText.go index 6ed194f..6c969ac 100644 --- a/plainText.go +++ b/plainText.go @@ -5,7 +5,7 @@ import "errors" type PlainText struct { *CommonAttributes Type string `xml:"type,attr,omitempty"` // Must be text or html - Text string `xml:"text"` + Text string `xml:",chardata"` } // isText checks whether the PlainText is a Text. It returns a bool.