summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/template-part.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/blocks/template-part.php')
-rw-r--r--wp-includes/blocks/template-part.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/blocks/template-part.php b/wp-includes/blocks/template-part.php
index 8c01c5a..4332bb3 100644
--- a/wp-includes/blocks/template-part.php
+++ b/wp-includes/blocks/template-part.php
@@ -157,7 +157,7 @@ function render_block_core_template_part( $attributes ) {
global $wp_embed;
$content = $wp_embed->autoembed( $content );
- if ( empty( $attributes['tagName'] ) ) {
+ if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) {
$area_tag = 'div';
if ( $area_definition && isset( $area_definition['area_tag'] ) ) {
$area_tag = $area_definition['area_tag'];