diff --git wp-includes/formatting.php wp-includes/formatting.php
index 3828c6a..284c9df 100644
|
|
function wpautop($pee, $br = true) { |
421 | 421 | $pee .= '<p>' . trim($tinkle, "\n") . "</p>\n"; |
422 | 422 | } |
423 | 423 | |
424 | | $pee = preg_replace('|<p>\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace |
| 424 | $pee = preg_replace('|<p[^>]*>\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace |
425 | 425 | $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', "<p>$1</p></$2>", $pee); |
426 | 426 | $pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag |
427 | 427 | $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists |
… |
… |
function wpautop($pee, $br = true) { |
429 | 429 | $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee); |
430 | 430 | $pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee); |
431 | 431 | $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); |
| 432 | $pee = balanceTags($pee, true); |
432 | 433 | |
433 | 434 | if ( $br ) { |
434 | 435 | $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee); |