diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php
index a65283cbe7..a43ec09439 100644
|
a
|
b
|
function get_the_block_template_html() { |
| 237 | 237 | $content = $wp_embed->run_shortcode( $_wp_current_template_content ); |
| 238 | 238 | $content = $wp_embed->autoembed( $content ); |
| 239 | 239 | $content = shortcode_unautop( $content ); |
| | 240 | $line_break_placeholder = function( $shortcode_output ) { |
| | 241 | return str_replace( "\n", '<!-- wp-block-theme-line-break-placeholder -->', $shortcode_output ); |
| | 242 | }; |
| | 243 | add_filter( 'do_shortcode_tag', $line_break_placeholder, 100 ); |
| 240 | 244 | $content = do_shortcode( $content ); |
| | 245 | remove_filter( 'do_shortcode_tag', $line_break_placeholder, 100 ); |
| 241 | 246 | $content = do_blocks( $content ); |
| 242 | 247 | $content = wptexturize( $content ); |
| 243 | 248 | $content = convert_smilies( $content ); |
| 244 | 249 | $content = wp_filter_content_tags( $content, 'template' ); |
| | 250 | $content = str_replace( '<!-- wp-block-theme-line-break-placeholder -->', "\n", $content ); |
| 245 | 251 | $content = str_replace( ']]>', ']]>', $content ); |
| 246 | 252 | |
| 247 | 253 | // Wrap block template in .wp-site-blocks to allow for specific descendant styles |
diff --git a/src/wp-includes/blocks/template-part.php b/src/wp-includes/blocks/template-part.php
index 6f41f2a793..a3bc38fd85 100644
|
a
|
b
|
function render_block_core_template_part( $attributes ) { |
| 143 | 143 | |
| 144 | 144 | // Run through the actions that are typically taken on the_content. |
| 145 | 145 | $content = shortcode_unautop( $content ); |
| | 146 | $line_break_placeholder = function( $shortcode_output ) { |
| | 147 | return str_replace( "\n", '<!-- wp-block-theme-line-break-placeholder -->', $shortcode_output ); |
| | 148 | }; |
| | 149 | add_filter( 'do_shortcode_tag', $line_break_placeholder, 100 ); |
| 146 | 150 | $content = do_shortcode( $content ); |
| | 151 | remove_filter( 'do_shortcode_tag', $line_break_placeholder, 100 ); |
| 147 | 152 | $seen_ids[ $template_part_id ] = true; |
| 148 | 153 | $content = do_blocks( $content ); |
| 149 | 154 | unset( $seen_ids[ $template_part_id ] ); |
| 150 | 155 | $content = wptexturize( $content ); |
| 151 | 156 | $content = convert_smilies( $content ); |
| | 157 | $content = str_replace( '<!-- wp-block-theme-line-break-placeholder -->', "\n", $content ); |
| 152 | 158 | $content = wp_filter_content_tags( $content, "template_part_{$area}" ); |
| 153 | 159 | |
| 154 | 160 | // Handle embeds for block template parts. |