mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
Potential fix for code scanning alert no. 62: 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
50f4f822b3
commit
8b2176344a
@ -27,9 +27,9 @@ export async function cleanNoteContent(content: string, type: string, mime: stri
|
|||||||
.replace(/ /g, ' ')
|
.replace(/ /g, ' ')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
.replace(/&/g, '&')
|
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
.replace(/'/g, "'");
|
.replace(/'/g, "'")
|
||||||
|
.replace(/&/g, '&');
|
||||||
|
|
||||||
// Normalize whitespace (replace multiple spaces/newlines with single space)
|
// Normalize whitespace (replace multiple spaces/newlines with single space)
|
||||||
content = content.replace(/\s+/g, ' ');
|
content = content.replace(/\s+/g, ' ');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user