From: Florent Bruneau Date: Tue, 1 Jun 2010 20:22:03 +0000 (+0200) Subject: Fix quoted-printable encoder when the subject contains a '?' X-Git-Tag: core/1.1.0~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=023024ebd592cc89ab1ded64766ad5246b7c054c;p=platal.git Fix quoted-printable encoder when the subject contains a '?' Signed-off-by: Florent Bruneau --- diff --git a/classes/plmailer.php b/classes/plmailer.php index 8c3c8dd..19b5b6d 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -212,7 +212,7 @@ class PlMailer extends Mail_Mime { public function setSubject($subject) { if (!preg_match('/^[\x20-\x7e]*$/', $subject)) { - $subject = '=?UTF-8?Q?' . preg_replace('/[^\x21-\x3C\x3e-\x7e]/e', 'PlMailer::encodeQP("\0")', $subject) + $subject = '=?UTF-8?Q?' . preg_replace('/[^\x21-\x3C\x3e\x40-\x7e]/e', 'PlMailer::encodeQP("\0")', $subject) . '?='; } return parent::setSubject($subject);