Skip to content

Commit

Permalink
chore: fix security issue. #308 #249
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 9, 2021
1 parent bb94b73 commit d4ffe5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -66,6 +66,7 @@
"dependencies": {
"@babel/runtime": "^7.14.6",
"@uiw/react-markdown-preview": "3.4.4",
"rehype-sanitize": "5.0.1",
"rehype": "12.0.0"
},
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions website/Exmaple.tsx
@@ -1,4 +1,5 @@
import React, { Fragment } from 'react';
import rehypeSanitize from 'rehype-sanitize';
import MDEditor, { MDEditorProps } from '../';

let count = 1;
Expand All @@ -25,6 +26,7 @@ const Exmaple = (props = {} as { mdStr: string }) => {
value={state.value}
previewOptions={{
linkTarget: '_blank',
rehypePlugins: [rehypeSanitize],
}}
height={400}
highlightEnable={state.highlightEnable}
Expand Down

1 comment on commit d4ffe5c

@vercel
Copy link

@vercel vercel bot commented on d4ffe5c Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.