Make WordPress Core

Changeset 28817


Ignore:
Timestamp:
06/24/2014 12:53:41 AM (10 years ago)
Author:
wonderboymusic
Message:

Remove noscript from wpautop()'s list of block elements.

Props mdawaffe.
Fixes #27268.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r28626 r28817  
    204204            preserve_br = false,
    205205            blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
    206                 '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +
     206                '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
    207207                '|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
    208208
  • trunk/src/wp-includes/formatting.php

    r28808 r28817  
    157157        // Single quotes followed by spaces or ending punctuation.
    158158        if ( "'" !== $closing_single_quote ) {
    159             $dynamic[ '/\'(?=\Z|[.,)}>\-\]]|' . $spaces . ')/' ] = $closing_single_quote; 
     159            $dynamic[ '/\'(?=\Z|[.,)}>\-\]]|' . $spaces . ')/' ] = $closing_single_quote;
    160160        }
    161161
     
    348348    $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
    349349    // Space things out a little
    350     $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)';
     350    $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|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';
    351351    $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    352352    $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
Note: See TracChangeset for help on using the changeset viewer.