From e5eb9c69077590a3c742cf4d472c1f95120e9099 Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Thu, 16 Jan 2025 02:28:10 +0800 Subject: [PATCH] fix: the mathjax missing in feed. --- .vscode/settings.json | 1 + src/pages/feed.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index dc98056..568f2e5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -76,6 +76,7 @@ "jmoiron", "jungshik", "junkfix", + "katex", "khalil", "khtml", "koanughi", diff --git a/src/pages/feed.ts b/src/pages/feed.ts index f13f43a..ca26e93 100644 --- a/src/pages/feed.ts +++ b/src/pages/feed.ts @@ -58,6 +58,7 @@ const cleanupContent = async (html: string) => { return node; }, sanitize({ + dropElements: ['style'], dropAttributes: { class: ['*'], 'data-astro-source': ['*'], @@ -69,7 +70,7 @@ const cleanupContent = async (html: string) => { 'data-language': ['*'], 'data-footnotes': ['*'], }, - allowCustomElements: false, + allowCustomElements: true, allowComments: false, }), ]);