From e1e8c6dbf7ecfbdd1158afa04aeb8be44dd08f10 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sat, 13 Dec 2003 17:47:28 +0000 Subject: [PATCH] Update autop to include th and divs. git-svn-id: http://svn.automattic.com/wordpress/trunk@609 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b73790d914..2d48af9eec 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -76,11 +76,11 @@ function wpautop($pee, $br = 1) { $pee = preg_replace("|

(|", "$1", $pee); // problem with nested lists $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); + $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); + $pee = preg_replace('!(]*>)\s*
!', "$1", $pee); + $pee = preg_replace('!
(\s*)!', '$1', $pee); $pee = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $pee); return $pee;