WordPress.org

Make WordPress Core

Ticket #18534: 18534.2.patch

File 18534.2.patch, 1.9 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/js/editor.dev.js

     
    139139        }, 
    140140 
    141141        _wp_Autop : function(pee) { 
    142                 var blocklist = 'table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary'; 
     142                var blocklist = '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|noscript|samp|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary'; 
    143143 
    144144                if ( pee.indexOf('<object') != -1 ) { 
    145145                        pee = pee.replace(/<object[\s\S]+?<\/object>/g, function(a){ 
  • wp-includes/formatting.php

     
    221221 
    222222        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 
    223223        // Space things out a little 
    224         $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)'; 
     224        $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|noscript|samp|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; 
    225225        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    226226        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
    227227        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines