Ticket #4520: pluggable.php.patch
| File pluggable.php.patch, 1.3 KB (added by , 18 years ago) |
|---|
-
wp-includes/pluggable.php
194 194 195 195 // Mainly for legacy -- process a From: header if it's there 196 196 if ( $name == 'From' ) { 197 if ( strpos( '<', $content) !== false ) {197 if ( strpos($content, '<' ) !== false ) { 198 198 // So... making my life hard again? 199 $from_name = substr( $content, 0, strpos( '<', $content) - 1 );199 $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 ); 200 200 $from_name = str_replace( '"', '', $from_name ); 201 201 $from_name = trim( $from_name ); 202 202 203 $from_email = substr( $content, strpos( '<', $content) + 1 );203 $from_email = substr( $content, strpos( $content, '<' ) + 1 ); 204 204 $from_email = str_replace( '>', '', $from_email ); 205 205 $from_email = trim( $from_email ); 206 206 } else { 207 207 $from_name = trim( $content ); 208 208 } 209 209 } elseif ( $name == 'Content-Type' ) { 210 if ( strpos( ';', $content) !== false ) {210 if ( strpos( $content,';' ) !== false ) { 211 211 list( $type, $charset ) = explode( ';', $content ); 212 212 $content_type = trim( $content_type ); 213 213 $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );