diff options
| author | Samuel Johnson <[email protected]> | 2025-12-11 03:54:00 -0500 |
|---|---|---|
| committer | Samuel Johnson <[email protected]> | 2025-12-11 03:54:00 -0500 |
| commit | d8be5d4de062da335e33a30c5e514efe250c120f (patch) | |
| tree | 97757923b73845d3fa1fa58c206c1d57c7ee692b | |
| parent | 69e326fb842e238c8440a10ea1284459e8e3d458 (diff) | |
Unescape HTML in a different way
| -rw-r--r-- | cmd/web/handlers/export.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/web/handlers/export.go b/cmd/web/handlers/export.go index 3f18a7f..96ba68d 100644 --- a/cmd/web/handlers/export.go +++ b/cmd/web/handlers/export.go @@ -110,9 +110,7 @@ func (ctx *rssExportContext) feed(w http.ResponseWriter, r *http.Request) { // This can be configured on the JSON encoder. // It cannot on the XML. // God only knows why. - out = bytes.Replace(out, []byte("&"), []byte("&"), -1) - out = bytes.Replace(out, []byte(">"), []byte(">"), -1) - out = bytes.Replace(out, []byte("<"), []byte("<"), -1) + out = []byte(html.UnescapeString(string(out))) w.Write([]byte(xml.Header + `<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">` + string(out) + `</rss>`)) } |
