WordPress.org

Make WordPress Core

Changeset 13982


Ignore:
Timestamp:
04/04/10 01:14:22 (4 years ago)
Author:
nacin
Message:

Add block-level HTML5 elements to wpautop(). props rmccue. fixes #12335

File:
1 edited

Legend:

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

    r13942 r13982  
    186186    $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 
    187187    // Space things out a little 
    188     $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)'; 
     188    $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)'; 
    189189    $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 
    190190    $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 
Note: See TracChangeset for help on using the changeset viewer.