Add initial XML tag with UTF-8 standard encoding

This commit is contained in:
Jason Streifling 2024-04-04 16:48:29 +02:00
parent 524bf96761
commit 05f0a0e9c9

2
rss.go
View File

@ -239,5 +239,5 @@ func (f *Feed) ToXML() (string, error) {
return "", fmt.Errorf("error XML encoding feed: %v", err)
}
return string(xml), nil
return `<?xml version="1.0" encoding="UTF-8"?>` + string(xml), nil
}