Skip to content

Commit

Permalink
Purify DOM lingforms
Browse files Browse the repository at this point in the history
  • Loading branch information
moysa committed Sep 2, 2024
1 parent 3e8bbe3 commit 8ffc00a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PrimalMarkdown/MarkdownSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { profileRegex } from '../../constants';
import { PrimalArticle } from '../../types/primal';
import { userName } from '../../stores/profile';
import { npubToHex } from '../../lib/keys';
import DOMPurify from 'dompurify';


const MarkdownSlice: Component<{
Expand Down Expand Up @@ -168,7 +169,7 @@ const MarkdownSlice: Component<{
})

return (
<div innerHTML={html()}>
<div innerHTML={DOMPurify.sanitize(html())}>
</div>
)
}
Expand Down

0 comments on commit 8ffc00a

Please sign in to comment.