From 41323883a5d229b3628aad42624517d3245b0341 Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 7 Jan 2022 15:29:38 -0600 Subject: [PATCH] utf-8 encode rss --- lib/rss.js | 2 +- pages/rss.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rss.js b/lib/rss.js index 62255028..d53f2414 100644 --- a/lib/rss.js +++ b/lib/rss.js @@ -31,7 +31,7 @@ const generateRssItem = (item) => { export default function generateRssFeed (items) { const itemsList = items.map(generateRssItem) - return ` + return ` ${SITE_TITLE} diff --git a/pages/rss.js b/pages/rss.js index 235181d6..2f24b2b7 100644 --- a/pages/rss.js +++ b/pages/rss.js @@ -17,7 +17,7 @@ export async function getServerSideProps ({ req, res }) { if (!items || error) return emptyProps - res.setHeader('Content-Type', 'text/xml') + res.setHeader('Content-Type', 'text/xml; charset=utf-8') res.write(generateRssFeed(items)) res.end()