Changeset 4565
- Timestamp:
- 12/01/2006 02:53:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r4562 r4565 33 33 // regular expressions 34 34 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 35 } elseif ( strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd' || strstr($curl, '<style') || strstr($curl, '<script'))) {35 } elseif ( strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd') || strstr($curl, '<style') || strstr($curl, '<script') ) { 36 36 $next = false; 37 37 } else { … … 64 64 $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end 65 65 $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace 66 $pee = preg_replace( '|<p>(<div[^>]*>\s*)|', "$1<p>", $pee ); 67 $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee); 68 $pee = preg_replace( '|<p>|', "$1<p>", $pee ); 66 69 $pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag 67 70 $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists … … 80 83 $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee); 81 84 $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); 85 /**/ 82 86 return $pee; 83 87 }
Note: See TracChangeset
for help on using the changeset viewer.