diff --git a/controllers/blog.go b/controllers/blog.go
index 97e907d..693f079 100644
--- a/controllers/blog.go
+++ b/controllers/blog.go
@@ -16,7 +16,9 @@ along with this program. If not, see .Rawley Fow
*/
import (
+ "bytes"
"net/http"
+ "strings"
"text/template"
"github.com/gin-gonic/gin"
@@ -76,9 +78,11 @@ func (bc *BlogController) RSSFeed(c *gin.Context) {
return
}
c.Header("Content-Type", "text/xml")
- err = t.Execute(c.Writer, posts)
+ var rawXml bytes.Buffer
+ err = t.Execute(&rawXml, posts)
if err != nil {
c.HTML(http.StatusInternalServerError, "internal_server_error", &gin.H{})
return
}
+ c.String(http.StatusOK, strings.Replace(rawXml.String(), "&", "&", -1), &gin.H{})
}
diff --git a/templates/rss.tmpl b/templates/rss.tmpl
index b2b64df..305231a 100644
--- a/templates/rss.tmpl
+++ b/templates/rss.tmpl
@@ -20,7 +20,7 @@
{{$post.Title}}
{{$post.Date}}
https://rawley.xyz/blog/post/{{$post.Url}}
-
+ {{$post.Title}}
rawleyfowler@gmail.com
{{end}}