Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug where file names get embedded single quotes.

  • Loading branch information...
commit ddef5fbb5a7f7c850460e214033238a085df5668 1 parent e232e5b
@martinstreicher martinstreicher authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/csv_shaper_template.rb
View
2  lib/csv_shaper_template.rb
@@ -27,7 +27,7 @@ def self.call(template)
unless defined?(ActionMailer) && defined?(ActionMailer::Base) && controller.is_a?(ActionMailer::Base)
@filename ||= "\#{controller.action_name}.csv"
controller.response.headers["Content-Type"] ||= 'text/csv'
- controller.response.headers['Content-Disposition'] = "attachment; filename='\#{@filename}'"
+ controller.response.headers['Content-Disposition'] = "attachment; filename=\\\"\#{@filename}\\\""
end
CsvShaperTemplate.encode(self) do |csv|
Please sign in to comment.
Something went wrong with that request. Please try again.