diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php
index 57829e8da0..24a3ffb9db 100644
--- a/b2-include/b2functions.php
+++ b/b2-include/b2functions.php
@@ -72,10 +72,10 @@ function wpautop($pee, $br=1) {
$pee = str_replace('
', '
', $pee); $pee = str_replace('
', '', $pee); - $pee = preg_replace('!\s*(?(?:table|ul|ol|li|pre|select|form|blockquote)>)!', "$1", $pee); + $pee = preg_replace('!
\s*(?(?:table|ul|ol|li|pre|select|form|blockquote)[^>]*>)!', "$1", $pee); $pee = preg_replace('!(?(?:table|ul|ol|li|pre|select|form|blockquote)>)\s*
!', "$1", $pee); if ($br) $pee = preg_replace('|(?)\s*\n|', "]*)>|i', "', $pee); $pee = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $pee);', '", $pee); $pee = str_replace('