Changeset 7068
- Timestamp:
- 02/27/2008 09:19:59 PM (18 years ago)
- File:
-
- 1 edited
-
branches/2.3/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/wp-includes/formatting.php
r6453 r7068 80 80 $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); 81 81 if ($br) { 82 $pee = preg_replace ('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\\0")', $pee);82 $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'return str_replace("\n", "<WPPreserveNewline />", $matches[0]);'), $pee); 83 83 $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 84 84 $pee = str_replace('<WPPreserveNewline />', "\n", $pee);
Note: See TracChangeset
for help on using the changeset viewer.