WordPress.org

Make WordPress Core

Changeset 7056


Ignore:
Timestamp:
02/27/2008 12:37:40 AM (12 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.