CDATA is overwritten, append instead

See testcase in https://github.com/jteeuwen/go-pkg-rss/blob/master/feed_test.go of an example of where CDATA is overwritten.
This commit is contained in:
Chris Grindstaff 2013-03-28 17:05:49 -03:00
parent f2fb9084dd
commit f41a2d1569
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func (this *Document) LoadStream(r io.Reader, charset CharsetFunc) (err error) {
case xml.SyntaxError:
return errors.New(tt.Error())
case xml.CharData:
ct.Value = strings.TrimSpace(string([]byte(tt)))
ct.Value = ct.Value + strings.TrimSpace(string([]byte(tt)))
case xml.Comment:
t := NewNode(NT_COMMENT)
t.Value = strings.TrimSpace(string([]byte(tt)))