Potential fix for code scanning alert no. 61: 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:30:25 -07:00 committed by GitHub
parent 8727ff95f1
commit 3cda253d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -248,8 +248,8 @@ export class ContextFormatter implements IContextFormatter {
.replace(/&nbsp;/g, ' ') .replace(/&nbsp;/g, ' ')
.replace(/&lt;/g, '<') .replace(/&lt;/g, '<')
.replace(/&gt;/g, '>') .replace(/&gt;/g, '>')
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"') .replace(/&quot;/g, '"')
.replace(/&amp;/g, '&')
.replace(/\n\s*\n\s*\n/g, '\n\n'); // Replace multiple blank lines with just one .replace(/\n\s*\n\s*\n/g, '\n\n'); // Replace multiple blank lines with just one
} }
}); });