Ticket #1024: 1024.patch

File 1024.patch, 2.1 KB (added by shorty114, 5 years ago)

Based on latest svn 11/29/06 2:48 pm PST

  • wp-includes/formatting.php

     
    6666        $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists 
    6767        $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee); 
    6868        $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee); 
    69         $pee = preg_replace('!<p>\s*(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|hr|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)!', "$1", $pee); 
    70         $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*</p>!', "$1", $pee); 
     69        $pee = preg_replace('!<p>\s*(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|hr|pre|select|form|fieldset|legend|blockquote|address|math|p|h[1-6])[^>]*>)!', "$1", $pee); 
     70        $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|fieldset|legend|blockquote|address|math|p|h[1-6])[^>]*>)\s*</p>!', "$1", $pee); 
    7171        if ($br) { 
    7272                $pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\\0")', $pee); 
    7373                $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
    7474                $pee = str_replace('<WPPreserveNewline />', "\n", $pee); 
    7575        } 
    76         $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee); 
     76        $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|fieldset|legend|blockquote|address|math|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee); 
    7777        $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); 
    7878        $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') .  stripslashes(clean_pre('$2'))  . '</pre>' ", $pee); 
    7979