Make WordPress Core

Ticket #3698: post.patch

File post.patch, 962 bytes (added by Viper007Bond, 19 years ago)

Patch for described change + minor formatting fixes

  • wp-includes/post.php

     
    7474// get extended entry info (<!--more-->)
    7575function get_extended($post) {
    7676        //Match the new style more links
    77         if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) {
    78                 list($main,$extended) = explode($matches[0],$post,2);
     77        if ( preg_match('/<!--more(.*?)-->/', $post, $matches) ) {
     78                list($main, $extended) = explode($matches[0], $post, 2);
    7979        } else {
    8080                $main = $post;
    8181                $extended = '';
    8282        }
    8383       
    8484        // Strip leading and trailing whitespace
    85         $main = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$main);
    86         $extended = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$extended);
     85        $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
     86        $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
    8787
    8888        return array('main' => $main, 'extended' => $extended);
    8989}