Skip to content

Commit

Permalink
Reserved chars are no longer stripped from data-image-title in WP 6.6+
Browse files Browse the repository at this point in the history
  • Loading branch information
tbradsha committed Jun 20, 2024
1 parent f667aaa commit 53e896e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/e2e/specs/blocks/blocks__media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ describe( DataHelper.createSuiteTitle( 'Blocks: Media (Upload)' ), function () {

describe( 'Validate published post', function () {
it( `Image with reserved characters in filename is visible`, async function () {
await ImageBlock.validatePublishedContent( page, [
testFiles.imageReservedName.filename.replace( /[^a-zA-Z ]/g, '' ),
await Promise.any( [
// WP < 6.6
ImageBlock.validatePublishedContent( page, [
testFiles.imageReservedName.filename.replace( /[^a-zA-Z ]/g, '' ),
] ),
// WP 6.6+, see https://github.com/WordPress/wordpress-develop/commit/2358de1767168232ff0e7c17e550b8a99f96002e
ImageBlock.validatePublishedContent( page, [ testFiles.imageReservedName.filename ] ),
] );
} );

Expand Down

0 comments on commit 53e896e

Please sign in to comment.