Ticket #7988: wpautop.morespecific.7988.diff
File wpautop.morespecific.7988.diff, 885 bytes (added by , 16 years ago) |
---|
-
wp-includes/formatting.php
134 134 foreach ( $pees as $tinkle ) 135 135 $pee .= '<p>' . trim($tinkle, "\n") . "</p>\n"; 136 136 $pee = preg_replace('|<p>\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace 137 $pee = preg_replace(' !<p>([^<]+)</(div|address|form)>!', "<p>$1</p></$2>", $pee);137 $pee = preg_replace('#<p>\s*?(?!</)(\S.*)(</(?:address|div|form)[^>]*>)#', "<p>$1</p>$2", $pee); 138 138 $pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag 139 139 $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists 140 140 $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);