diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 3446671fea..a27101886d 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -26,7 +26,7 @@ function wptexturize($text) { for ( $i = 0; $i < $stop; $i++ ) { $curl = $textarr[$i]; - if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag or shortcode + if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag // static strings $curl = str_replace($static_characters, $static_replacements, $curl); // regular expressions @@ -74,7 +74,6 @@ function wpautop($pee, $br = 1) { $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "
$1
\n", $pee); // make paragraphs, including one at the end $pee = preg_replace('|\s*?
|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace - $pee = preg_replace('/(\s*?' . get_shortcode_regex(true) . '\s*)<\/p>/s', '$1', $pee); // don't auto-p wrap post-formatting shortcodes $pee = preg_replace('!
([^<]+)\s*?((?:div|address|form)[^>]*>)!', "
$1
$2", $pee); $pee = preg_replace( '||', "$1
", $pee ); $pee = preg_replace('!
\s*(?' . $allblocks . '[^>]*>)\s*
!', "$1", $pee); // don't pee all over a tag @@ -841,7 +840,6 @@ function wp_trim_excerpt($text) { // Fakes an excerpt if needed $text = get_the_content(''); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); - $text = preg_replace('|//\s*'; } - + return $html; } -add_shortcode('gallery', 'gallery_shortcode', true); +add_shortcode('gallery', 'gallery_shortcode'); function gallery_shortcode($attr) { global $post; @@ -377,7 +377,7 @@ function gallery_shortcode($attr) { $captiontag = tag_escape($captiontag); $columns = intval($columns); $itemwidth = $columns > 0 ? floor(100/$columns) : 100; - + $output = apply_filters('gallery_style', "