Sanitize markdown HTML output with DOMPurify to prevent XSS (#658)

This commit is contained in:
Thomas Durieux
2026-04-15 04:22:38 +02:00
committed by GitHub
parent b2d77faa6c
commit 812f8b6314
6 changed files with 1299 additions and 3 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -182,5 +182,5 @@ function renderMD(md, baseUrlValue) {
throwOnError: false,
})
);
return marked.parse(md, { renderer });
return DOMPurify.sanitize(marked.parse(md, { renderer }));
}