Skip to content

Commit

Permalink
Hotfix: Fix Query Loop with excerpt outputting invalid HTML (#41333)
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar authored and matticbot committed Jan 28, 2025
1 parent 4cd4d08 commit 3ed133a
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 89 deletions.
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jetpack_vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ This is an alpha version! The changes listed here are not final.
- Add messages area anchor in customize_welcome_message Launchpad task path
- GB 19.8.0 hotfix: further refine hotfix so site editor opens correct template by default
- Global Styles: Adding hidden style under wpcom-global-style-view
- Hotfix for a {Gutenberg 20.0.0, WP 6.7.x} bug causing the Content block to output truncated HTML.
- MU WPCOM: Don't load ETK on agency sites on all pages

## [6.1.0] - 2025-01-10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,29 @@ function ( $args ) {
},
20
);

/**
* Hotfix for a {Gutenberg 20.0.0, WP 6.7.x} bug causing the Content block to output truncated HTML.
* See: https://github.com/WordPress/gutenberg/issues/68614
*/
if (
// WordPress 6.7.x contains the buggy remove_serialized_parent_block() function.
version_compare( get_bloginfo( 'version' ), '6.8', '<' ) ) {

add_filter(
'the_content',
function ( $content ) {
if ( has_filter( 'the_content', 'remove_serialized_parent_block' ) ) {
// We will revert the content manipulation done in https://github.com/WordPress/gutenberg/pull/67272.

// Reverts https://github.com/WordPress/gutenberg/pull/67272/files#diff-611d9e2b5a9b00eb2fbe68d044eccb195759a422e36f525186d43d752bee3d71R65-R68
remove_filter( 'the_content', 'remove_serialized_parent_block', 8 );

// Reverts https://github.com/WordPress/gutenberg/pull/67272/files#diff-611d9e2b5a9b00eb2fbe68d044eccb195759a422e36f525186d43d752bee3d71R57-R63
return remove_serialized_parent_block( $content );
}
return $content;
},
1
);
}
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
),
'jetpack-mu-wpcom' => array(
'path' => 'jetpack_vendor/automattic/jetpack-mu-wpcom',
'ver' => '6.2.0-alpha1738029568',
'ver' => '6.2.0-alpha1738036753',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
Expand Down
Loading

0 comments on commit 3ed133a

Please sign in to comment.