Changeset 7056

Show
Ignore:
Timestamp:
02/27/08 00:37:40 (6 months ago)
Author:
ryan
Message:

Use preg_replace_callback() instead of using the 'e' modifier.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/formatting.php

    r7055 r7056  
    8484    $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); 
    8585    if ($br) { 
    86         $pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\\0")', $pee); 
     86        $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'return str_replace("\n", "<WPPreserveNewline />", $matches[0]);'), $pee); 
    8787        $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
    8888        $pee = str_replace('<WPPreserveNewline />', "\n", $pee);