diff --git a/src/tools/fetch/web-fetch-utils.ts b/src/tools/fetch/web-fetch-utils.ts index 2779cfb..4a5b8e7 100644 --- a/src/tools/fetch/web-fetch-utils.ts +++ b/src/tools/fetch/web-fetch-utils.ts @@ -40,9 +40,9 @@ export function htmlToMarkdown(html: string): { text: string; title?: string } { do { previous = text; text = text - .replace(//gi, "") - .replace(//gi, "") - .replace(//gi, ""); + .replace(/]*>/gi, "") + .replace(/]*>/gi, "") + .replace(/]*>/gi, ""); } while (text !== previous); text = text.replace(/]*href=["']([^"']+)["'][^>]*>([\s\S]*?)<\/a>/gi, (_, href, body) => { const label = normalizeWhitespace(stripTags(body));