From 1fe2cdf0692e14a8345e7bd2d9d1f1f8bca2af02 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Fri, 30 Apr 2021 10:37:25 +0300 Subject: [PATCH] Prevent PostDate as link to load inside an iframe (#31350) --- packages/block-library/src/post-date/edit.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/post-date/edit.js b/packages/block-library/src/post-date/edit.js index ee998f01188248..9421de7d53e39d 100644 --- a/packages/block-library/src/post-date/edit.js +++ b/packages/block-library/src/post-date/edit.js @@ -80,7 +80,14 @@ export default function PostDateEdit( { attributes, context, setAttributes } ) { __( 'No Date' ) ); if ( isLink && date ) { - postDate = { postDate }; + postDate = ( + event.preventDefault() } + > + { postDate } + + ); } return ( <>