Potential fix for code scanning alert no. 64: Double escaping or unescaping

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Jon Fuller 2025-04-11 13:36:41 -07:00 committed by GitHub
parent 6cc4b7e226
commit 91c31d279b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,10 +172,10 @@ export class NoteSummarizationTool implements ToolHandler {
text = text
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#39;/g, "'")
.replace(/&nbsp;/g, ' ');
.replace(/&nbsp;/g, ' ')
.replace(/&amp;/g, '&');
// Normalize whitespace
text = text.replace(/\s+/g, ' ').trim();