From 3bd4752bfd4e50d260d91ecf2eceae0d93f71aa5 Mon Sep 17 00:00:00 2001 From: Guoqi Sun Date: Mon, 23 Dec 2024 02:07:33 +0800 Subject: [PATCH] fix: fix rss content --- src/pages/atom/index.xml.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/atom/index.xml.ts b/src/pages/atom/index.xml.ts index cd17f7b..142aa73 100644 --- a/src/pages/atom/index.xml.ts +++ b/src/pages/atom/index.xml.ts @@ -1,5 +1,4 @@ import rss from "@astrojs/rss" -import sanitizeHtml from "sanitize-html" import { zh as config } from "~/config" import { getPostsByLocale } from "~/utils" @@ -18,7 +17,7 @@ export async function GET() { description: post.data.description, pubDate: post.data.pubDate, link: `/posts/${post.id}/`, - content: sanitizeHtml(post.body), + content: post.rendered ? post.rendered.html : post.data.description, })), customData: "", })