Fix quoted-printable encoder when the subject contains a '?'
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 1 Jun 2010 20:22:03 +0000 (22:22 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 1 Jun 2010 20:22:03 +0000 (22:22 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plmailer.php

index 8c3c8dd..19b5b6d 100644 (file)
@@ -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);