Sanitize Markdown inputs
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import Remarkable from "react-remarkable"
|
||||
import React from "react"
|
||||
|
||||
import Remarkable from "react-remarkable"
|
||||
import sanitize from "sanitize-html"
|
||||
|
||||
export default function Markdown({ source }) {
|
||||
const sanitized = sanitize(source)
|
||||
return <Remarkable
|
||||
options={{html: true, typographer: true, linkify: true, linkTarget: "_blank"}}
|
||||
source={source}
|
||||
source={sanitized}
|
||||
></Remarkable>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user