diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 17:49:24 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 17:49:24 +0000 |
commit | 54cc595dff2564d6cb48c40709637170bca79837 (patch) | |
tree | be23790b9eae6e8a4d943674b9d82cd57f924a61 /actionmailer/lib | |
parent | f3e5e07982946f05b9826d5701aa95359bb5a10f (diff) | |
download | rails-54cc595dff2564d6cb48c40709637170bca79837.tar.gz rails-54cc595dff2564d6cb48c40709637170bca79837.tar.bz2 rails-54cc595dff2564d6cb48c40709637170bca79837.zip |
Improved address header processing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 |