WordPress.org

Make WordPress Core

Ticket #14674: 14674.2.diff

File 14674.2.diff, 960 bytes (added by solarissmoke, 20 months ago)

Refreshed

  • wp-includes/formatting.php

     
    223223        $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)'; 
    224224        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    225225        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
     226        $pee = str_replace( '<hr />', "\n\n<hr />\n\n", $pee );   // hr's are block-level and self-closing 
    226227        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines 
    227228        if ( strpos($pee, '<object') !== false ) { 
    228229                $pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed