diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index 5affa58a6..dacfabbed 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 = str_replace('

', '

', $pee); $pee = preg_replace('!

\s*(]*>)!', "$1", $pee); - $pee = preg_replace('!()\s*

!', "$1", $pee); + $pee = preg_replace('!(]*>)\s*

!', "$1", $pee); if ($br) $pee = preg_replace('|(?)\s*\n|', "
\n", $pee); // optionally make line breaks $pee = preg_replace('!(]*>)\s*
!', "$1", $pee); $pee = preg_replace('!
(\s*)!', '$1', $pee);