Skip to content

Commit 7255987

Browse files
Potential fix for code scanning alert no. 43: Incomplete multi-character sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 0a884b8 commit 7255987

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/api/sqs/handlers/emailNotifications.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ const compiledTemplate = Handlebars.compile(emailTemplate);
1818

1919
const stripHtml = (html: string): string => {
2020
// Remove all HTML tags and attributes, then normalize whitespace and trim
21-
const sanitized = sanitizeHtml(html, {
22-
allowedTags: [],
23-
allowedAttributes: {},
24-
});
21+
const sanitized = sanitizeHtml(html, { allowedTags: [], allowedAttributes: {} });
2522
return sanitized.replace(/\s+/g, " ").trim();
2623
};
2724

0 commit comments

Comments
 (0)