From 532bc6490afc82187af9d8fccdd0bbbc57bad30d Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Thu, 4 Apr 2024 17:09:29 +0200 Subject: [PATCH] Added XML encoding --- cmd/control/rss.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/control/rss.go b/cmd/control/rss.go index 5721ddb..e445bc2 100644 --- a/cmd/control/rss.go +++ b/cmd/control/rss.go @@ -107,7 +107,7 @@ func GenerateRSS(db *model.DB, title, link, desc string) (*string, error) { feed := rss.NewFeed() feed.Channels = append(feed.Channels, channel) - rss, err := feed.ToXML() + rss, err := feed.ToXML("UTF-8") if err != nil { return nil, fmt.Errorf("error converting RSS feed to XML: %v", err) } diff --git a/go.mod b/go.mod index e3b1fb3..c3bcb1b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module streifling.com/jason/cpolis go 1.22.0 require ( - git.streifling.com/jason/rss v0.0.0-20240305164907-524bf9676188 + git.streifling.com/jason/rss v0.0.0-20240404150220-c4aea5c6a64d github.com/go-sql-driver/mysql v1.7.1 github.com/gorilla/sessions v1.2.2 github.com/microcosm-cc/bluemonday v1.0.26 diff --git a/go.sum b/go.sum index e79d004..00fa220 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -git.streifling.com/jason/rss v0.0.0-20240305164907-524bf9676188 h1:C8M/j3f+cl5Y7YfGpU/ynb/SC/4tTYMDsyGFt3rswM8= -git.streifling.com/jason/rss v0.0.0-20240305164907-524bf9676188/go.mod h1:gpZF0nZbQSstMpyHD9DTAvlQEG7v4pjO5c7aIMWM4Jg= +git.streifling.com/jason/rss v0.0.0-20240404150220-c4aea5c6a64d h1:Kcuzgwt6y6CHRVhvk/tr+fPtWdJSOqVcrLAmjQ3+8Ss= +git.streifling.com/jason/rss v0.0.0-20240404150220-c4aea5c6a64d/go.mod h1:gpZF0nZbQSstMpyHD9DTAvlQEG7v4pjO5c7aIMWM4Jg= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=