Skip to content

Commit

Permalink
fix: encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Mar 16, 2024
1 parent b1947a1 commit e48593e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/middleware.ts
@@ -1,4 +1,5 @@
import { getBaseSiteURL } from "$utils";
import { decode } from "tiny-decode";
import { ELEMENT_NODE, transform, walk } from "ultrahtml";
import sanitize from "ultrahtml/transformers/sanitize";
import { defineMiddleware } from "astro:middleware";
Expand Down Expand Up @@ -51,7 +52,7 @@ export const onRequest = defineMiddleware(async (ctx, next) => {
headers.delete("Content-Type");
headers.set("Content-Type", "application/rss+xml");

return new Response(output, {
return new Response(decode(output), {
status: 200,
headers: headers,
});
Expand Down
4 changes: 2 additions & 2 deletions src/pages/rss/blog.astro
Expand Up @@ -31,7 +31,7 @@ function makeOutro() {
}
---

<Fragment set:html={makeIntro()} />
<Fragment set:text={makeIntro()} />
{
articles.map(async (article) => {
const start = `\t<item>
Expand All @@ -54,4 +54,4 @@ function makeOutro() {
);
})
}
<Fragment set:html={makeOutro()} />
<Fragment set:text={makeOutro()} />

0 comments on commit e48593e

Please sign in to comment.