diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index 5affa58a60..dacfabbedc 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -17,7 +17,7 @@ if (!function_exists('floatval')) { /***** Formatting functions *****/ function wptexturize($text) { $output = ""; - $textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between + $textarr = preg_split("/(<.*>)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between $stop = count($textarr); $next = true; // loop stuff for ($i = 0; $i < $stop; $i++) { $curl = $textarr[$i]; @@ -77,7 +77,7 @@ function wpautop($pee, $br=1) { $pee = preg_replace('|
]*)>|i', "', $pee); $pee = preg_replace('!', '", $pee); $pee = str_replace('
\s*(?(?:table|tr|td|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)!', "$1", $pee); - $pee = preg_replace('!(?(?:table|tr|td|ul|ol|li|pre|select|form|blockquote|p|h[1-6])>)\s*
!', "$1", $pee); + $pee = preg_replace('!(?(?:table|tr|td|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*!', "$1", $pee); if ($br) $pee = preg_replace('|(?)\s*\n|', "