From 43e126ed54fca2fcaa5997a35c0bea5d6617ddc4 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 25 Apr 2022 17:03:25 +0300 Subject: [PATCH] [Block Library - Latest Posts]: Prevent opening the links in editor --- packages/block-library/src/latest-posts/edit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/latest-posts/edit.js b/packages/block-library/src/latest-posts/edit.js index 32d41040f256b9..5924a18af9e587 100644 --- a/packages/block-library/src/latest-posts/edit.js +++ b/packages/block-library/src/latest-posts/edit.js @@ -466,7 +466,11 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { .join( ' ' ) } { /* translators: excerpt truncation character, default … */ } { __( ' … ' ) } - + event.preventDefault() } + rel="noopener noreferrer" + > { __( 'Read more' ) } @@ -482,6 +486,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { + event.preventDefault() + } rel="noreferrer noopener" > { featuredImage } @@ -493,6 +500,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { ) } event.preventDefault() } rel="noreferrer noopener" dangerouslySetInnerHTML={ !! titleTrimmed