File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
apps/web/components/layout Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import Head from "next/head";
44import Image from "next/image" ;
55import Link from "next/link" ;
66import ReactMarkdown from "react-markdown" ;
7+ import rehypeRaw from "rehype-raw" ;
8+ import rehypeSanitize from "rehype-sanitize" ;
9+ import remarkGfm from "remark-gfm" ;
710import { ROUTES } from "../../data/routes.data" ;
811import { BlogPost } from "../../pages/blog" ;
912import { getImageUrl } from "../../utils/cms" ;
@@ -196,7 +199,16 @@ export default function BlogLayout({
196199 ) : null }
197200
198201 < div className = "blog-content-override prose dark:prose-invert prose-indigo mx-auto mt-6" >
199- < ReactMarkdown > { content } </ ReactMarkdown >
202+ < ReactMarkdown
203+ rehypePlugins = { [
204+ rehypeRaw ,
205+ // @ts -ignore
206+ rehypeSanitize ( { tagNames : [ "div" , "iframe" ] } ) ,
207+ remarkGfm ,
208+ ] }
209+ >
210+ { content }
211+ </ ReactMarkdown >
200212 </ div >
201213 </ div >
202214 </ div >
You can’t perform that action at this time.
0 commit comments