From 2a2b919daf665df828fb69bff3b339dc76bb46ee Mon Sep 17 00:00:00 2001 From: Zhenyi-Wang <47094597+Zhenyi-Wang@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:37:29 +0800 Subject: [PATCH] feat: remove style tag when fetching url (#2913) Co-authored-by: zhenyiwang --- packages/service/common/string/cheerio.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/service/common/string/cheerio.ts b/packages/service/common/string/cheerio.ts index 99b26a461..32726eb04 100644 --- a/packages/service/common/string/cheerio.ts +++ b/packages/service/common/string/cheerio.ts @@ -20,7 +20,7 @@ export const cheerioToHtml = ({ const selectDom = $(usedSelector); // remove i element - selectDom.find('i,script').remove(); + selectDom.find('i,script,style').remove(); // remove empty a element selectDom