WordPress.org

Make WordPress Core

Ticket #10269: 10269.diff

File 10269.diff, 695 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-includes/formatting.php

     
    170170        if (strpos($pee, '<pre') !== false) 
    171171                $pee = preg_replace_callback('!(<pre[^>]*>)(.*?)</pre>!is', 'clean_pre', $pee ); 
    172172        $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); 
    173         $pee = preg_replace('/<p>\s*?(' . get_shortcode_regex() . ')\s*<\/p>/s', '$1', $pee); // don't auto-p wrap shortcodes that stand alone 
     173        $pee = preg_replace('/<p>\s*?(' . get_shortcode_regex() . ')\s*<\/p>/s', '<div>$1</div>', $pee); // don't auto-p wrap shortcodes that stand alone 
    174174 
    175175        return $pee; 
    176176}