Changeset 7068

Show
Ignore:
Timestamp:
02/27/08 21:19:59 (7 months ago)
Author:
ryan
Message:

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

Files:

Legend:

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

    r6453 r7068  
    8080    $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); 
    8181    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); 
    8383        $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
    8484        $pee = str_replace('<WPPreserveNewline />', "\n", $pee);