mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
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:
parent
6cc4b7e226
commit
91c31d279b
@ -172,10 +172,10 @@ export class NoteSummarizationTool implements ToolHandler {
|
||||
text = text
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, "'")
|
||||
.replace(/ /g, ' ');
|
||||
.replace(/ /g, ' ')
|
||||
.replace(/&/g, '&');
|
||||
|
||||
// Normalize whitespace
|
||||
text = text.replace(/\s+/g, ' ').trim();
|
||||
|
Loading…
x
Reference in New Issue
Block a user