Check for [\r\n\t ] instead of \s in get_content_chat() to avoid UTF-8 issues. see #23625.
git-svn-id: http://core.svn.wordpress.org/trunk@23914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d4b834a16
commit
f7e2bb59d6
|
@ -528,9 +528,9 @@ function get_content_chat( &$content, $remove = false ) {
|
|||
$matched = preg_match( $newline_regex, $line, $matches );
|
||||
$author_match = empty( $matches[2] ) ? $matches[1] : $matches[2];
|
||||
// assume username syntax if no whitespace is present
|
||||
$no_ws = $matched && ! preg_match( '#\s#', $author_match );
|
||||
$no_ws = $matched && ! preg_match( '#[\r\n\t ]#', $author_match );
|
||||
// allow script-like stanzas
|
||||
$has_ws = $matched && preg_match( '#\s#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
|
||||
$has_ws = $matched && preg_match( '#[\r\n\t ]#', $author_match ) && empty( $lines[$index + 1] ) && empty( $lines[$index - 1] );
|
||||
if ( $matched && ( ! empty( $matches[2] ) || ( $no_ws || $has_ws ) ) ) {
|
||||
if ( ! empty( $author ) ) {
|
||||
$stanza[] = array(
|
||||
|
|
Loading…
Reference in New Issue