Make WordPress Core

Changeset 20078


Ignore:
Timestamp:
03/02/2012 07:59:50 PM (13 years ago)
Author:
nacin
Message:

<input> is not a block-level element; do not treat it like one in wpautop(). props SergeyBiryukov. props kurtpayne for the unit test. fixes #16456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

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