WordPress.org

Make WordPress Core

Changeset 4894


Ignore:
Timestamp:
02/20/2007 05:41:39 AM (13 years ago)
Author:
ryan
Message:

Don't insert p inside of div. fixes #3669

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/wp-includes/formatting.php

    r4710 r4894  
    6464    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
    6565    $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
    66     $pee = preg_replace( '|<p>(<div[^>]*>\s*)|', "$1<p>", $pee );
    6766    $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
    6867    $pee = preg_replace( '|<p>|', "$1<p>", $pee );
     
    8382        $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') .  stripslashes(clean_pre('$2'))  . '</pre>' ", $pee);
    8483    $pee = preg_replace( "|\n</p>$|", '</p>', $pee );
    85 /**/
     84
    8685    return $pee;
    8786}
  • trunk/wp-includes/formatting.php

    r4710 r4894  
    6464    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
    6565    $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
    66     $pee = preg_replace( '|<p>(<div[^>]*>\s*)|', "$1<p>", $pee );
    6766    $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
    6867    $pee = preg_replace( '|<p>|', "$1<p>", $pee );
     
    8382        $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') .  stripslashes(clean_pre('$2'))  . '</pre>' ", $pee);
    8483    $pee = preg_replace( "|\n</p>$|", '</p>', $pee );
    85 /**/
     84
    8685    return $pee;
    8786}
Note: See TracChangeset for help on using the changeset viewer.