diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-06-23 10:01:49 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-23 10:01:49 +0100 |
commit | ac59a76cc380af792a09e5dd82b8402dc966af42 (patch) | |
tree | 8c0640c44a11ac6f9e42fdb7fc7e6618da2ed6fe /app/controllers/request_controller.rb | |
parent | 994a13b08be94220512961b28de8fb95c8d181a5 (diff) | |
parent | 7983e37506f3fa16211255ef802bf50735adbdb8 (diff) |
Merge branch 'binary-or-utf8-attachment-bodies' into develop
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 45229fd7e..26e3b350c 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -763,12 +763,12 @@ class RequestController < ApplicationController # Prevent spam to magic request address. Note that the binary # subsitution method used depends on the content type - @incoming_message.apply_masks!(@attachment.body, @attachment.content_type) + body = @attachment.default_body + @incoming_message.apply_masks!(body, @attachment.content_type) if response.content_type == 'text/html' - @attachment.body = ActionController::Base.helpers.sanitize(@attachment.body) + body = ActionController::Base.helpers.sanitize(body) end - - render :text => @attachment.body + render :text => body end def get_attachment_as_html |