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