WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/27/2014 12:00:17 AM (7 years ago)
Author:
nacin
Message:

Remove select and input from wpautop()'s HTML blocks list.

props rachelbaker, DH-Shredder.
fixes #22230.

File:
1 edited

Legend:

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

    r27617 r27761  
    235235    $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
    236236    // Space things out a little
    237     $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|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';
     237    $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';
    238238    $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    239239    $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
Note: See TracChangeset for help on using the changeset viewer.