WordPress.org

Make WordPress Core

Ticket #16456: 16456.2.patch

File 16456.2.patch, 1.1 KB (added by SergeyBiryukov, 2 years ago)
  • wp-includes/formatting.php

     
    178178        $pee = $pee . "\n"; // just to make things a little easier, pad the end 
    179179        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 
    180180        // Space things out a little 
    181         $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|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; 
     181        $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)'; 
    182182        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    183183        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
    184184        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines