Skip to content

Commit e7a2e24

Browse files
Fix code scanning alert no. 21: Incomplete multi-character sanitization (#10)
Signed-off-by: Legion's <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 61a3322 commit e7a2e24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/src/model/markdown.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ export const withInsertedCodeFromLinks = (content: string) => {
100100
};
101101

102102
export const withoutComments = (content: string) => {
103-
return sanitizeHtml(content, {
104-
allowedTags: sanitizeHtml.defaults.allowedTags.filter(tag => tag !== '!--')
103+
return
104+
allowedTags: sanitizeHtml.defaults.allowedTags.filter(tag => tag !== '!--'),
105+
allowedAttributes: {}
105106
});
106107
};
107108

0 commit comments

Comments
 (0)