Recognize paragraph tags with attributes when stripping breaks. Props rockinfree. fixes #1706
git-svn-id: https://develop.svn.wordpress.org/trunk@4167 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
82c3412199
commit
ca314e4aa1
@ -76,7 +76,7 @@ function wpautop($pee, $br = 1) {
|
||||
$pee = str_replace('<WPPreserveNewline />', "\n", $pee);
|
||||
}
|
||||
$pee = preg_replace('!(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee);
|
||||
$pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!', '$1', $pee);
|
||||
$pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);
|
||||
$pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee);
|
||||
|
||||
return $pee;
|
||||
|
Loading…
x
Reference in New Issue
Block a user