From 363715a0e3bacad9181cfa9165d3d40ed1200475 Mon Sep 17 00:00:00 2001
From: saxmatt
Date: Thu, 16 Oct 2003 16:58:48 +0000
Subject: [PATCH] Texturize preg_split .* should match newlines as well.
git-svn-id: http://svn.automattic.com/wordpress/trunk@455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
b2-include/b2functions.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 = str_replace('
', '', $pee);
$pee = preg_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|', "
\n", $pee); // optionally make line breaks
$pee = preg_replace('!(?(?:table|tr|td|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*
!', "$1", $pee);
$pee = preg_replace('!
(\s*?(?:p|li|pre|td|ul|ol)>)!', '$1', $pee);