Ticket #3238: 3238_trunk.diff
File 3238_trunk.diff, 1.2 KB (added by , 18 years ago) |
---|
-
wp-includes/formatting.php
69 69 $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])>)!', "$1\n\n", $pee); 70 70 $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines 71 71 $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates 72 $pee = preg_replace('/\n?(.+?)(?:\n\s* \n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end72 $pee = preg_replace('/\n?(.+?)(?:\n\s*|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end 73 73 $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace 74 74 $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])[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag 75 75 $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists