Make WordPress Core

Ticket #23625: 23625.12.diff

File 23625.12.diff, 966 bytes (added by SergeyBiryukov, 12 years ago)
  • wp-includes/post-formats.php

     
    526526                $matched = preg_match( $newline_regex, $line, $matches );
    527527                $author_match = empty( $matches[2] ) ? $matches[1] : $matches[2];
    528528                // assume username syntax if no whitespace is present
    529                 $no_ws = $matched && ! preg_match( '#\s#', $author_match );
     529                $no_ws = $matched && ! preg_match( '#[\r\n\t ]#', $author_match );
    530530                // allow script-like stanzas
    531                 $has_ws = $matched && preg_match( '#\s#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
     531                $has_ws = $matched && preg_match( '#[\r\n\t ]#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
    532532                if ( $matched && ( ! empty( $matches[2] ) || ( $no_ws || $has_ws ) ) ) {
    533533                        if ( ! empty( $author ) ) {
    534534                                $stanza[] = array(