Changeset 16313 for trunk/wp-includes/formatting.php
- Timestamp:
- 11/11/2010 10:50:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r16280 r16313 237 237 $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); 238 238 if ($br) { 239 $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_ _autop_newline_preservation_helper', $pee);239 $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee); 240 240 $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 241 241 $pee = str_replace('<WPPreserveNewline />', "\n", $pee); … … 258 258 * @returns string 259 259 */ 260 function _ _autop_newline_preservation_helper( $matches ) {260 function _autop_newline_preservation_helper( $matches ) { 261 261 return str_replace("\n", "<WPPreserveNewline />", $matches[0]); 262 262 } … … 1596 1596 } else { 1597 1597 $subject = str_replace('_', ' ', $matches[2]); 1598 $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', '_ _wp_iso_convert', $subject);1598 $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject); 1599 1599 return $subject; 1600 1600 } … … 1608 1608 * @param $match the preg_replace_callback matches array 1609 1609 */ 1610 function _ _wp_iso_convert( $match ) {1610 function _wp_iso_convert( $match ) { 1611 1611 return chr( hexdec( strtolower( $match[1] ) ) ); 1612 1612 }
Note: See TracChangeset
for help on using the changeset viewer.