From 9423769bf4c4e20fb5d14e622eed58e0b44f028a Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 7 Feb 2022 09:06:45 +0000 Subject: [PATCH] Site Editor: Remove extra div on post content (#38451) * Post Content: Remvoe extra div when post content is rendered in the site editor * Post Content: Remvoe extra div when post content is rendered in the site editor * Dangerously set html directly without using RawHTML * Set HTML without creating an element * fix lint offence Co-authored-by: ntsekouras --- packages/block-library/src/post-content/edit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/post-content/edit.js b/packages/block-library/src/post-content/edit.js index b9a11f0d1bec82..75a2b77a1d0caf 100644 --- a/packages/block-library/src/post-content/edit.js +++ b/packages/block-library/src/post-content/edit.js @@ -3,7 +3,6 @@ */ import { __ } from '@wordpress/i18n'; import { useSelect } from '@wordpress/data'; -import { RawHTML } from '@wordpress/element'; import { useBlockProps, useInnerBlocksProps, @@ -32,9 +31,10 @@ function ReadOnlyContent( { userCanEdit, postType, postId } ) { { __( 'This content is password protected.' ) } ) : ( -
- { content?.rendered } -
+
); }