Ticket #2059: formatting.php.patch
File formatting.php.patch, 782 bytes (added by , 17 years ago) |
---|
-
wp-includes/formatting.php
78 78 $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee); 79 79 $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); 80 80 if (strpos($pee, '<pre') !== false) 81 $pee = preg_replace ('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee);81 $pee = preg_replace_callback('!(<pre.*?>)(.*?)</pre>!is', create_function('$matches', 'return $matches[1] . clean_pre($matches[2]) . "</pre>";'), $pee); 82 82 $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); 83 83 84 84 return $pee;