Changeset 7811 for branches/2.5/wp-includes/formatting.php
- Timestamp:
- 04/24/2008 10:31:37 PM (18 years ago)
- File:
-
- 1 edited
-
branches/2.5/wp-includes/formatting.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-includes/formatting.php
r7700 r7811 27 27 $curl = $textarr[$i]; 28 28 29 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag or shortcode29 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag 30 30 // static strings 31 31 $curl = str_replace($static_characters, $static_replacements, $curl); … … 75 75 $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end 76 76 $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace 77 $pee = preg_replace('/<p>(\s*?' . get_shortcode_regex(true) . '\s*)<\/p>/s', '$1', $pee); // don't auto-p wrap post-formatting shortcodes78 77 $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee); 79 78 $pee = preg_replace( '|<p>|', "$1<p>", $pee ); … … 842 841 $text = apply_filters('the_content', $text); 843 842 $text = str_replace(']]>', ']]>', $text); 844 $text = preg_replace('|//\s*<!\[CDATA\[|', '<![CDATA[', $text);845 843 $text = strip_tags($text); 846 844 $excerpt_length = 55;
Note: See TracChangeset
for help on using the changeset viewer.