fix: the mathjax missing in feed.

This commit is contained in:
Yufan Sheng 2025-01-16 02:28:10 +08:00
parent 2815d74922
commit e5eb9c6907
Signed by: syhily
GPG Key ID: DEB186763C308C31
2 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,7 @@
"jmoiron", "jmoiron",
"jungshik", "jungshik",
"junkfix", "junkfix",
"katex",
"khalil", "khalil",
"khtml", "khtml",
"koanughi", "koanughi",

View File

@ -58,6 +58,7 @@ const cleanupContent = async (html: string) => {
return node; return node;
}, },
sanitize({ sanitize({
dropElements: ['style'],
dropAttributes: { dropAttributes: {
class: ['*'], class: ['*'],
'data-astro-source': ['*'], 'data-astro-source': ['*'],
@ -69,7 +70,7 @@ const cleanupContent = async (html: string) => {
'data-language': ['*'], 'data-language': ['*'],
'data-footnotes': ['*'], 'data-footnotes': ['*'],
}, },
allowCustomElements: false, allowCustomElements: true,
allowComments: false, allowComments: false,
}), }),
]); ]);