Skip to content

Commit 20ae3a4

Browse files
Potential fix for code scanning alert no. 97: Incomplete URL scheme check
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 942fa9e commit 20ae3a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web/src/utils/markdownSanitization.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const sanitizeMarkdown = (markdown: string): string => {
4747
// Optional: Remove encoded protocols/entities as before
4848
sanitized = sanitized.replace(/javascript:/gi, "");
4949
sanitized = sanitized.replace(/vbscript:/gi, "");
50+
sanitized = sanitized.replace(/data:/gi, "");
5051
sanitized = sanitized.replace(/&#x[0-9a-f]+;/gi, "");
5152
sanitized = sanitized.replace(/&#[0-9]+;/gi, "");
5253

0 commit comments

Comments
 (0)