WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/25/2008 12:46:17 AM (14 years ago)
Author:
markjaquith
Message:

Don't wpautop()-wrap shortcodes that stand alone. fixes #6444 for 2.5.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/formatting.php

    r7811 r7816  
    9393        $pee = preg_replace_callback('!(<pre.*?>)(.*?)</pre>!is', 'clean_pre', $pee );
    9494    $pee = preg_replace( "|\n</p>$|", '</p>', $pee );
     95    $pee = preg_replace('/<p>\s*?(' . get_shortcode_regex() . ')\s*<\/p>/s', '$1', $pee); // don't auto-p wrap shortcodes that stand alone
    9596
    9697    return $pee;
Note: See TracChangeset for help on using the changeset viewer.