Make WordPress Core

Changeset 23914


Ignore:
Timestamp:
04/04/2013 11:43:59 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Check for [\r\n\t ] instead of \s in get_content_chat() to avoid UTF-8 issues. see #23625.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-formats.php

    r23899 r23914  
    529529        $author_match = empty( $matches[2] ) ? $matches[1] : $matches[2];
    530530        // assume username syntax if no whitespace is present
    531         $no_ws = $matched && ! preg_match( '#\s#', $author_match );
     531        $no_ws = $matched && ! preg_match( '#[\r\n\t ]#', $author_match );
    532532        // allow script-like stanzas
    533         $has_ws = $matched && preg_match( '#\s#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
     533        $has_ws = $matched && preg_match( '#[\r\n\t ]#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
    534534        if ( $matched && ( ! empty( $matches[2] ) || ( $no_ws || $has_ws ) ) ) {
    535535            if ( ! empty( $author ) ) {
Note: See TracChangeset for help on using the changeset viewer.