Skip to content

Commit 1fd5ac9

Browse files
committed
The Weston's Regex
1 parent 883983c commit 1fd5ac9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/pluggable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
351351
} elseif ( false !== stripos( $charset_content, 'boundary=' ) ) {
352352
$boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset_content ) );
353353
$charset = '';
354-
if ( preg_match( '~multipart/([a-z]+)~i', $content_type, $matches ) ) {
354+
if ( preg_match( '~^multipart/(\S+)~', $content_type, $matches ) ) {
355355
$content_type = 'multipart/' . strtolower( $matches[1] ) . '; boundary="' . $boundary . '"';
356356
}
357357
}

0 commit comments

Comments
 (0)