[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-95-g1c1d8a2

Ruslan Zakirov ruz at bestpractical.com
Tue Jun 29 12:13:35 EDT 2010


The branch, 3.9-trunk has been updated
       via  1c1d8a202f6d012485f2f0b4fc4cb94ea5dd902d (commit)
      from  e1f8be744fbd91b1448f15613b9fb3aebdc25ce1 (commit)

Summary of changes:
 lib/RT/Interface/Email.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 1c1d8a202f6d012485f2f0b4fc4cb94ea5dd902d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Jun 23 23:44:45 2010 +0400

    don't encode folded headers and tabs in EncodeToMIME
    
    * rfc822 allows you to put whole ascii into header field body,
      let's allow tab as well
    * if field is folded then do nothing special
    * use B encoding in other cases

diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index f618c40..35a56a7 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -890,7 +890,7 @@ sub EncodeToMIME {
         return ($value);
     }
 
-    return ($value) unless $value =~ /[^\x20-\x7e]/;
+    return ($value) if $value =~ /^(?:[\t\x20-\x7e]|\x0D*\x0A[ \t])+$/s;
 
     $value =~ s/\s+$//;
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list