Convert received mail to default encoding
This fixes a problem when the received mail does not use UTF-8 as encoding.
This commit is contained in:
parent
380bd62168
commit
499758edc4
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ class MessagesMailReceiver
|
||||||
body = Nokogiri::HTML(body).text
|
body = Nokogiri::HTML(body).text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
body.encode!(Encoding::default_internal)
|
||||||
body = EmailReplyTrimmer.trim(body)
|
body = EmailReplyTrimmer.trim(body)
|
||||||
|
|
||||||
message = @user.send_messages.new body: body,
|
message = @user.send_messages.new body: body,
|
||||||
|
|
Loading…
Reference in a new issue