From f34782e69d295489c6bacb479b3ef0c66923fe47 Mon Sep 17 00:00:00 2001
From: Matt Mullenweg
Date: Wed, 20 Aug 2003 22:12:31 +0000
Subject: [PATCH] Fix for autop to allow attributes on elements.
git-svn-id: https://develop.svn.wordpress.org/trunk@322 602fd350-edb4-49c9-b593-d223f7449a82
---
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);