aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-12-11 03:20:58 -0500
committerSamuel Johnson <[email protected]>2025-12-11 03:20:58 -0500
commit6e60ede1270c65654ee53e8a24cb310e0b1ab725 (patch)
tree2ba33dcd523dc22686cfa5c43b13f757a568636b
parent9fe97dad50e26c30e78036b9d029575504627969 (diff)
Switch from escaping to CDATA, seems a lot of readers don't support escaping...
-rw-r--r--cmd/web/handlers/export.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/web/handlers/export.go b/cmd/web/handlers/export.go
index a4db69d..ecb867b 100644
--- a/cmd/web/handlers/export.go
+++ b/cmd/web/handlers/export.go
@@ -86,16 +86,13 @@ func (ctx *rssExportContext) feed(w http.ResponseWriter, r *http.Request) {
}
}
- brief := html.EscapeString(string(p.Brief))
- content := html.EscapeString(string(p.Content))
-
feed.Items = append(feed.Items, Item{
Title: title,
Link: "https://" + ctx.serv + "/post?id=" + strconv.Itoa(p.Id),
Guid: "https://" + ctx.serv + "/post?id=" + strconv.Itoa(p.Id),
- Description: brief,
+ Description: "<![CDATA[<" + string(p.Brief) + "]]>",
PubDate: p.FormattedTime,
- Content: content,
+ Content: "<![CDATA[<" + string(p.Content) + "]]>",
})
}