[Codestriker-commits] CVS update: codestriker/lib/Codestriker/TopicListeners Email.pm
                
                Brought to you by:
                
                    sits
                    
                
            
            
        
        
        
    | 
      
      
      From: <si...@us...> - 2008-01-09 04:08:54
      
     | 
|   User: sits    
  Date: 08/01/08 20:08:53
  Modified:    .        CHANGELOG
               lib      Codestriker.pm
               lib/Codestriker/TopicListeners Email.pm
  Log:
  Make sure the email subject field properly encodes underscores and
  question marks.  Submitted by jo...@us....
  
  
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
  retrieving revision 1.218
  retrieving revision 1.219
  diff -u -r1.218 -r1.219
  --- CHANGELOG	24 Oct 2007 10:09:36 -0000	1.218
  +++ CHANGELOG	9 Jan 2008 04:08:52 -0000	1.219
  @@ -6,6 +6,9 @@
   * Allow the ability to specify just a filename (for the module field)
     and a revision number (for the start or end tag) to create a review
     for a specific version of a file in a subversion repository.
  +
  +* Make sure the email subject field properly encodes underscores and
  +  question marks.  Submitted by jo...@us....
   	
   Version 1.9.4
   
  
  
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- Codestriker.pm	2 Oct 2007 04:38:21 -0000	1.105
  +++ Codestriker.pm	9 Jan 2008 04:08:52 -0000	1.106
  @@ -36,7 +36,7 @@
   	      );
   
   # Version of Codestriker.
  -$Codestriker::VERSION = "1.9.4";
  +$Codestriker::VERSION = "1.9.5";
   
   # Default title to display on each Codestriker screen.
   $Codestriker::title = "Codestriker $Codestriker::VERSION";
  
  
  
  
  
  Index: Email.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Email.pm	30 Nov 2007 20:46:54 -0000	1.23
  +++ Email.pm	9 Jan 2008 04:08:53 -0000	1.24
  @@ -489,9 +489,13 @@
   
       # Make sure the subject is appropriately encoded to handle UTF-8
       # characters.
  -    $smtp->datasend('Subject: =?UTF-8?Q?' .
  -		    encode_qp(encode("UTF-8", $subject), '') .
  -		    '?=' . "\n");
  +    $subject = encode_qp(encode("UTF-8", $subject), "");
  +
  +    # RFC 2047 fixup that is a documented deviation from quoted-printable
  +    $subject =~ s/\?/=3F/g;
  +    $subject =~ s/_/=5F/g;
  +    $subject =~ s/ /_/g;
  +    $smtp->datasend("Subject: =?UTF-8?Q?${subject}?=\n");
   
       # Set the content type to be text/plain with UTF8 encoding, to handle
       # unicode characters.
  
  
  
 |