WordPress.org

Make WordPress Core

Ticket #54013: 54013.diff

File 54013.diff, 749 bytes (added by davecpage, 3 months ago)

Adding ungreedy/lazy quantifier

  • src/wp-includes/block-supports/layout.php

     
    118118 * @return string Filtered block content.
    119119 */
    120120function wp_restore_group_inner_container( $block_content, $block ) {
    121         $group_with_inner_container_regex = '/(^\s*<div\b[^>]*wp-block-group(\s|")[^>]*>)(\s*<div\b[^>]*wp-block-group__inner-container(\s|")[^>]*>)((.|\S|\s)*)/';
     121        $group_with_inner_container_regex = '/(^\s*<div\b[^>]*wp-block-group(\s|")[^>]*>)(\s*<div\b[^>]*wp-block-group__inner-container(\s|")[^>]*>)((.|\S|\s)*)/U';
    122122
    123123        if (
    124124                'core/group' !== $block['blockName'] ||