Better code range to detect pure-ascii text.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Sep 2008 15:40:14 +0000 (17:40 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Sep 2008 15:40:14 +0000 (17:40 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plmailer.php

index 45f3a8a..2ac4184 100644 (file)
@@ -203,7 +203,7 @@ class PlMailer extends Mail_Mime {
 
     public function setSubject($subject)
     {
-        if (!preg_match('/^[\x21-\x3C\x3e-\x7e]*$/', $subject)) {
+        if (!preg_match('/^[\x20-\x7e]*$/', $subject)) {
             $subject = '=?UTF-8?Q?' . preg_replace('/[^\x21-\x3C\x3e-\x7e]/e', 'PlMailer::encodeQP("\0")', $subject)
                      . '?=';
         }