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 ba1b797b0f

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 "", fmt.Errorf("error XML encoding feed: %v", err)
} }
return string(xml), nil return `<?xml version="1.0" encoding="UTF-8"?>` + string(xml), nil
} }