Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rfc2047.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Rfc2047
WORD = /=\?([!#$\%&'*+-\/0-9A-Z\\^\`a-z{|}~]+)\?([BbQq])\?([!->@-~]+)\?=/ # :nodoc:

# Look for two adjacent words in the same encoding.
ADJACENT_WORDS = /(#{WORD})[\s\r\n]+(?==\?(\2)\?([BbQq])\?)/
ADJACENT_WORDS = /(#{WORD})\s+(?==\?(\2)\?([BbQq])\?)/

# Decodes a string, +from+, containing RFC 2047 encoded words into a target
# character set, +target+ defaulting to utf-8. See iconv_open(3) for information on the
Expand Down
3 changes: 1 addition & 2 deletions test/rfc2047_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def test_cases
'=?US-ASCII?Q?Keith_Moore?= <moore / cs.utk.edu>' => {
'utf-8' => 'Keith Moore <moore / cs.utk.edu>',
'ascii' => 'Keith Moore <moore / cs.utk.edu>',
'us-ascii' => 'Keith Moore <moore / cs.utk.edu>',
'ascii' => 'Keith Moore <moore / cs.utk.edu>',
'us-ascii' => 'Keith Moore <moore / cs.utk.edu>'
},

'=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld / dkuug.dk>' => {
Expand Down