Make WordPress Core

Ticket #18807: 18807.samp-no-block-2.patch

File 18807.samp-no-block-2.patch, 2.0 KB (added by toscho, 12 years ago)

remove samp from block list in js and php

  • wp-admin/js/editor.js

     
    138138
    139139        _wp_Autop : function(pee) {
    140140                var preserve_linebreaks = false, preserve_br = false,
    141                         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';
     141                        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|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
    142142
    143143                if ( pee.indexOf('<object') != -1 ) {
    144144                        pee = pee.replace(/<object[\s\S]+?<\/object>/g, function(a){
  • wp-includes/formatting.php

     
    220220
    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|noscript|samp|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|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);
    226226        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines