From 6c2e156a5a9629ccfe91ffd2680d03375dd40a42 Mon Sep 17 00:00:00 2001 From: otdoges Date: Tue, 12 Aug 2025 13:42:33 -0500 Subject: [PATCH] Potential fix for code scanning alert no. 122: Incomplete multi-character sanitization Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/lib/search-service.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/search-service.ts b/src/lib/search-service.ts index 8b5d9157..113080f2 100644 --- a/src/lib/search-service.ts +++ b/src/lib/search-service.ts @@ -316,9 +316,16 @@ export class BraveSearchService { } private extractTextContent(html: string): string { - return html - .replace(/]*>.*?<\/script>/gi, '') - .replace(/]*>.*?<\/style>/gi, '') + // Repeatedly remove