WordPress.org

Make WordPress Core

Ticket #9484: add-col-to-list-of-html-elements-in-formatting-php.diff

File add-col-to-list-of-html-elements-in-formatting-php.diff, 937 bytes (added by CharlieHamu, 5 years ago)

Patch to formatting.php

  • wp-includes/formatting.php

     
    117117        $pee = $pee . "\n"; // just to make things a little easier, pad the end 
    118118        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 
    119119        // Space things out a little 
    120         $allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)'; 
     120        $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)'; 
    121121        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    122122        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
    123123        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines