WordPress.org

Make WordPress Core

Ticket #15600: 15600.diff

File 15600.diff, 643 bytes (added by mdawaffe, 11 years ago)
  • wp-includes/formatting.php

     
    249249        if ( !empty($shortcode_tags) && is_array($shortcode_tags) ) {
    250250                $tagnames = array_keys($shortcode_tags);
    251251                $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
    252                 $pee = preg_replace('/<p>\\s*?(\\[(' . $tagregexp . ')\\b.*?\\/?\\](?:.+?\\[\\/\\2\\])?)\\s*<\\/p>/s', '$1', $pee);
     252                $pee = preg_replace('/<p>\\s*(\\[(' . $tagregexp . ')\\b.*\\](?:.++\\[\\/\\2\\])?)\\s*<\\/p>/sU', '$1', $pee);
    253253        }
    254254
    255255        return $pee;