We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22ee2c0 commit 9c04748Copy full SHA for 9c04748
1 file changed
website/src/components/Glossary/GlossaryTable.tsx
@@ -54,11 +54,15 @@ const GlossaryTable: React.FC = () => {
54
const canonicalEntries: DisplayEntry[] = glossaryItems.map((item) => {
55
const slug = slugify(item.term);
56
const html = marked.parse(item.definition || '', { async: false }) as string;
57
+ const sanitizedHtml =
58
+ typeof window !== 'undefined' && purifyRef.current
59
+ ? purifyRef.current.sanitize(html)
60
+ : html;
61
return {
62
term: item.term,
63
abbreviation: item.abbreviation,
64
definition: item.definition,
- definitionHtml: html,
65
+ definitionHtml: sanitizedHtml,
66
canonicalTerm: item.term,
67
isAlias: false,
68
slug,
0 commit comments