From f3d1d48dc727bb67de4c5c67621c5f56a2463e13 Mon Sep 17 00:00:00 2001
From: saxmatt
Date: Wed, 20 Aug 2003 22:12:31 +0000
Subject: [PATCH] Fix for autop to allow attributes on elements.
git-svn-id: http://svn.automattic.com/wordpress/trunk@322 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 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 = 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|', "
\n", $pee); // optionally make line breaks
- $pee = preg_replace('!(?(?:table|ul|ol|li|pre|select|form|blockquote|p)>)
!', "$1", $pee);
+ $pee = preg_replace('!(?(?:table|ul|ol|li|pre|select|form|blockquote|p)[^>]*>)
!', "$1", $pee);
$pee = preg_replace('|]*)>|i', "", $pee);
$pee = str_replace('
', '
', $pee);
$pee = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $pee);