From a23afef46002412c2c1f429fb3e3bcb27b2d4cf3 Mon Sep 17 00:00:00 2001 From: Mario Santos Date: Tue, 26 Nov 2024 11:36:51 +0100 Subject: [PATCH] Make tags lowercase Co-authored-by: cbravobernal --- src/wp-includes/class-wp-block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-block.php b/src/wp-includes/class-wp-block.php index a1c52019c29a5..e272d86e22e90 100644 --- a/src/wp-includes/class-wp-block.php +++ b/src/wp-includes/class-wp-block.php @@ -364,7 +364,7 @@ private function replace_html( string $block_content, string $attribute_name, $s // Store the parent tag and its attributes to be able to restore them later in the button. // The button block has a wrapper while the paragraph and heading blocks don't. if ( 'core/button' === $this->name ) { - $button_wrapper = $block_reader->get_tag(); + $button_wrapper = strtolower( $block_reader->get_tag() ); $button_wrapper_attribute_names = $block_reader->get_attribute_names_with_prefix( '' ); $button_wrapper_attrs = array(); foreach ( $button_wrapper_attribute_names as $name ) {