mirror of https://github.com/rails/rails
Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com] Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com] Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
df7a4d498c
commit
87b1d3834f
|
@ -1,5 +1,11 @@
|
||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
|
* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
|
||||||
|
|
||||||
|
* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com]
|
||||||
|
|
||||||
|
* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com]
|
||||||
|
|
||||||
* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
|
* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,7 @@ module TMail
|
||||||
else
|
else
|
||||||
raise 'TMail FATAL: encoder scan fail'
|
raise 'TMail FATAL: encoder scan fail'
|
||||||
end
|
end
|
||||||
str = m.post_match
|
(str = m.post_match) unless m.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
do_encode types, strs
|
do_encode types, strs
|
||||||
|
|
|
@ -281,6 +281,8 @@ module TMail
|
||||||
when /\AFrom (\S+)/
|
when /\AFrom (\S+)/
|
||||||
unixfrom = $1
|
unixfrom = $1
|
||||||
|
|
||||||
|
when /^charset=.*/
|
||||||
|
|
||||||
else
|
else
|
||||||
raise SyntaxError, "wrong mail header: '#{line.inspect}'"
|
raise SyntaxError, "wrong mail header: '#{line.inspect}'"
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,7 +35,7 @@ begin
|
||||||
from_charset = $1
|
from_charset = $1
|
||||||
quoting_method = $2
|
quoting_method = $2
|
||||||
text = $3
|
text = $3
|
||||||
case quoting_method
|
case quoting_method.upcase
|
||||||
when "Q" then
|
when "Q" then
|
||||||
unquote_quoted_printable_and_convert_to(text, from_charset, to_charset)
|
unquote_quoted_printable_and_convert_to(text, from_charset, to_charset)
|
||||||
when "B" then
|
when "B" then
|
||||||
|
|
Loading…
Reference in New Issue