diff --git a/packages/block-library/src/quote/index.js b/packages/block-library/src/quote/index.js index 78e53875b771db..d3f020a220c3db 100644 --- a/packages/block-library/src/quote/index.js +++ b/packages/block-library/src/quote/index.js @@ -100,7 +100,12 @@ export const settings = { }, { type: 'raw', - selector: 'blockquote', + isMatch: ( node ) => ( + node.nodeName === 'BLOCKQUOTE' && + // The quote block can only handle multiline paragraph + // content. + Array.from( node.childNodes ).every( ( child ) => child.nodeName === 'P' ) + ), schema: { blockquote: { children: { diff --git a/test/integration/__snapshots__/blocks-raw-handling.spec.js.snap b/test/integration/__snapshots__/blocks-raw-handling.spec.js.snap index 1fbb36f44d9abe..320b201a836e3c 100644 --- a/test/integration/__snapshots__/blocks-raw-handling.spec.js.snap +++ b/test/integration/__snapshots__/blocks-raw-handling.spec.js.snap @@ -44,5 +44,13 @@ exports[`Blocks raw handling rawHandler should convert HTML post to blocks with
+ + + +Text.
+" `; diff --git a/test/integration/fixtures/wordpress-convert.html b/test/integration/fixtures/wordpress-convert.html index 0a8a20c6e19b12..0fe1de21dc6621 100644 --- a/test/integration/fixtures/wordpress-convert.html +++ b/test/integration/fixtures/wordpress-convert.html @@ -23,3 +23,16 @@Heading
Text.
++ + + +Text.
+
+Heading
+Text.
+