WordPress.org

Make WordPress Core

Ticket #20304: 20304-1.diff

File 20304-1.diff, 1.1 KB (added by jkudish, 2 years ago)
  • wp-includes/formatting.php

     
    217217        $pee = $pee . "\n"; // just to make things a little easier, pad the end 
    218218        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 
    219219        // Space things out a little 
    220         $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; 
     220        $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary|del)'; 
    221221        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    222222        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
    223223        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines