File size: 602 Bytes
62cfde8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/client/app/utils/index.js b/client/app/utils/index.js
index 7bd7b039..b0015344 100644
--- a/client/app/utils/index.js
+++ b/client/app/utils/index.js
@@ -1,6 +1,7 @@
 // @flow
 import axios from 'axios';
 import renderHTML from 'react-render-html';
+import { sanitize } from 'dompurify';
 
 const randomString = () => Math.random()
   .toString(36)
@@ -34,7 +35,7 @@ const getPusher = () => {
 
 const renderContent = (content: string | any) => {
   if (typeof content === 'string') {
-    return renderHTML(content);
+    return renderHTML(sanitize(content));
   }
   return content;
 };