diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-06-24 11:19:43 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-06-24 11:19:43 +0100 |
commit | 2cce1794a4d9d2c42b83bab8a693900e8ca23ebc (patch) | |
tree | 7408a04d5ac0963ec2defbbf7d4955cff7cd62b5 /app/controllers | |
parent | ed6b256539e0dcaa3764951d90e2dc599a8acddd (diff) | |
parent | 54ba7a4fa232ad3b57310551b9a5e19d72060abe (diff) |
Merge branch 'develop' into release-22-develop
Diffstat (limited to 'app/controllers')
-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 |