X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmail%2FMailAddress.php;h=b9d94143d00f97a2908ba2ffbc5b80df66333fdb;hb=c168a3f637a6355c57394a8ee70496f8ab267c46;hp=ce1df0dbff4f28a14a324829b77d0f3843567127;hpb=8bb5a6c461c31ee5ce6874548246fc2c520686f6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php index ce1df0dbff..b9d94143d0 100644 --- a/includes/mail/MailAddress.php +++ b/includes/mail/MailAddress.php @@ -30,7 +30,6 @@ * header format when requested. */ class MailAddress { - /** * @var string */ @@ -89,8 +88,9 @@ class MailAddress { global $wgEnotifUseRealName; $name = ( $wgEnotifUseRealName && $this->realName !== '' ) ? $this->realName : $this->name; $quoted = UserMailer::quotedPrintable( $name ); - if ( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) { - $quoted = '"' . $quoted . '"'; + // Must only be quoted if string does not use =? encoding (T191931) + if ( $quoted === $name ) { + $quoted = '"' . addslashes( $quoted ) . '"'; } return "$quoted <{$this->address}>"; } else {