Make WordPress Core

Changeset 21888


Ignore:
Timestamp:
09/18/2012 05:32:44 PM (12 years ago)
Author:
nacin
Message:

Synchronize block-level elements between the JS and PHP versions of wpautop. props SergeyBiryukov. fixes #18534.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/editor.js

    r21592 r21888  
    141141    _wp_Autop : function(pee) {
    142142        var preserve_linebreaks = false, preserve_br = false,
    143             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';
     143            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';
    144144
    145145        if ( pee.indexOf('<object') != -1 ) {
  • trunk/wp-includes/formatting.php

    r21859 r21888  
    221221    $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
    222222    // Space things out a little
    223     $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)';
     223    $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)';
    224224    $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    225225    $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
Note: See TracChangeset for help on using the changeset viewer.