diff --git a/rss.go b/rss.go index 7b20699..ab8b41d 100644 --- a/rss.go +++ b/rss.go @@ -30,9 +30,6 @@ func generateAtomFeed(w http.ResponseWriter, blogs []Blog, siteURL string) { // Ensure all image paths are absolute URLs (Idiot proofing) absoluteContent := strings.ReplaceAll(string(htmlContent), "src=\"/", fmt.Sprintf("src=\"%s/", siteURL)) - // Wrap HTML content in - cdataContent := fmt.Sprintf("", absoluteContent) - // Ensure unique and stable ID entryID := fmt.Sprintf("%s/%s/%d", siteURL, blog.Name, entry.Number) @@ -53,7 +50,7 @@ func generateAtomFeed(w http.ResponseWriter, blogs []Blog, siteURL string) { Author: &feeds.Author{Name: entry.Author}, Id: entryID, Updated: entry.Date, - Content: cdataContent, + Content: absoluteContent, }) } } @@ -88,9 +85,6 @@ func generateBlogAtomFeed(w http.ResponseWriter, blog Blog, siteURL string) { // Ensure all image paths are absolute URLs (Idiot proofing) absoluteContent := strings.ReplaceAll(string(htmlContent), "src=\"/", fmt.Sprintf("src=\"%s/", siteURL)) - // Wrap HTML content in - cdataContent := fmt.Sprintf("", absoluteContent) - // Ensure unique and stable ID entryID := fmt.Sprintf("%s/%s/%d", siteURL, blog.Name, entry.Number) @@ -111,7 +105,7 @@ func generateBlogAtomFeed(w http.ResponseWriter, blog Blog, siteURL string) { Author: &feeds.Author{Name: entry.Author}, Id: entryID, Updated: entry.Date, - Content: cdataContent, + Content: absoluteContent, }) }