Merge pull request #14454 from strapi/fix/wysiwyg-preview

This commit is contained in:
Josh 2022-10-12 11:17:15 +01:00 committed by GitHub
commit fee711c4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ import sanitizeHtml from './utils/satinizeHtml';
import Wrapper from './Wrapper';
const PreviewWysiwyg = ({ data }) => {
const html = useMemo(() => sanitizeHtml(md.render(data || '')), [data]);
const html = useMemo(() => sanitizeHtml(md.render(data.replaceAll('\\n', '\n') || '')), [data]);
return (
<Wrapper>