diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor')
-rwxr-xr-x | actionmailer/lib/action_mailer/vendor/tmail/utils.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/utils.rb b/actionmailer/lib/action_mailer/vendor/tmail/utils.rb index 57df234464..57919473f1 100755 --- a/actionmailer/lib/action_mailer/vendor/tmail/utils.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/utils.rb @@ -206,8 +206,12 @@ module TMail def decode_RFC2231( str ) m = RFC2231_ENCODED.match(str) or return str - NKF.nkf(NKF_FLAGS[$KCODE], - m.post_match.gsub(/%[\da-f]{2}/in) {|s| s[1,2].hex.chr }) + begin + NKF.nkf(NKF_FLAGS[$KCODE], + m.post_match.gsub(/%[\da-f]{2}/in) {|s| s[1,2].hex.chr }) + rescue + m.post_match.gsub(/%[\da-f]{2}/in, "") + end end end |