Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 1836363

Browse files
yevbarfelixfbecker
authored andcommitted
feat: add more allowed tags and attributes for extensions (#83)
1 parent bb3a5e0 commit 1836363

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ export const renderMarkdown = (markdown: string): string => {
102102
// Allow highligh.js styles, e.g.
103103
// <span class="hljs-keyword">
104104
// <code class="language-javascript">
105-
allowedTags: [...sanitize.defaults.allowedTags, 'span'],
105+
allowedTags: [...sanitize.defaults.allowedTags, 'span', 'details', 'summary'],
106106
allowedAttributes: {
107107
span: ['class'],
108108
code: ['class'],
109+
a: ['href'],
109110
},
110111
})
111112
}

0 commit comments

Comments
 (0)