diff options
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 27a0c8e19c..b731880570 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -168,9 +168,9 @@ module ActionMailer #:nodoc: def quote_address_if_necessary(address, charset) if Array === address address.map { |a| quote_address_if_necessary(a, charset) } - elsif address =~ /^(\S.+)\s+(<.*>)$/ + elsif address =~ /^(\S.*)\s+(<.*>)$/ address = $2 - phrase = quote_if_necessary($1, charset) + phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset) "#{phrase} #{address}" else address |