- save progress;
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import parse from 'html-react-parser';
|
||||
import { isNil } from 'ramda';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
const renderHtmlContent = (content = '') => !isNil(content) ? parse(content) : '';
|
||||
const renderHtmlContent = (content = '') => {
|
||||
const clean = DOMPurify.sanitize(content);
|
||||
return !isNil(clean) ? parse(clean) : '';
|
||||
}
|
||||
|
||||
export default renderHtmlContent;
|
||||
Reference in New Issue
Block a user