public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Fixed RFC-2045 quoted-printable bug [#1421 state:committed]

http://www.faqs.org/rfcs/rfc2045.html says:

          may be
          represented by an "=" followed by a two digit
          hexadecimal representation of the octet's value.  The
          digits of the hexadecimal alphabet, for this purpose,
          are "0123456789ABCDEF".  Uppercase letters must be
          used; lowercase letters are not allowed.

ActionMailer, however, used "=%02x" specification.

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
squadette (author)
Thu Nov 20 04:52:18 -0800 2008
dhh (committer)
Thu Nov 20 14:10:15 -0800 2008
commit  84583657f40e5554c496fb24dfbc1921f11b0498
tree    264d35f4d205fef45d17fffe913fa99d3dfa8b23
parent  ebdbd854a92ff0594c9af53432d70de882b1c7d1
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *2.3.0 [Edge]*
0
 
0
+* Fixed RFC-2045 quoted-printable bug #1421 [squadette]
0
+
0
 * Fixed that no body charset would be set when there are attachments present #740 [PaweÅ‚ Kondzior]
0
 
0
 
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ module ActionMailer
0
     # account multi-byte characters (if executing with $KCODE="u", for instance)
0
     def quoted_printable_encode(character)
0
       result = ""
0
-      character.each_byte { |b| result << "=%02x" % b }
0
+      character.each_byte { |b| result << "=%02X" % b }
0
       result
0
     end
0
 
...
36
37
38
39
 
40
41
42
...
36
37
38
 
39
40
41
42
0
@@ -36,7 +36,7 @@ class TestHelperMailerTest < ActionMailer::TestCase
0
   end
0
 
0
   def test_encode
0
-    assert_equal "=?utf-8?Q?=0aasdf=0a?=", encode("\nasdf\n")
0
+    assert_equal "=?utf-8?Q?=0Aasdf=0A?=", encode("\nasdf\n")
0
   end
0
 
0
   def test_assert_emails

Comments