summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-08-30 16:37:21 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-08-30 16:37:21 +0000
commit497d0f34768c89ea0d473ff290ae782e8163bc88 (patch)
tree074f24db08fccaa4e7bd485e543099fedc68fea9 /app/controllers
parentec8d5892467a476e980016700510f87477b3e123 (diff)
downloadredmine-497d0f34768c89ea0d473ff290ae782e8163bc88.tar.gz
redmine-497d0f34768c89ea0d473ff290ae782e8163bc88.zip
Merged r16957 from trunk to 3.4-stable (#26599)
fix file name corruption when export a wiki page with non-ASCII title in MS browsers. Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16959 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/wiki_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 5496fbbdd..5d9a91327 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -100,14 +100,14 @@ class WikiController < ApplicationController
if User.current.allowed_to?(:export_wiki_pages, @project)
if params[:format] == 'pdf'
- send_file_headers! :type => 'application/pdf', :filename => "#{@page.title}.pdf"
+ send_file_headers! :type => 'application/pdf', :filename => filename_for_content_disposition("#{@page.title}.pdf")
return
elsif params[:format] == 'html'
export = render_to_string :action => 'export', :layout => false
- send_data(export, :type => 'text/html', :filename => "#{@page.title}.html")
+ send_data(export, :type => 'text/html', :filename => filename_for_content_disposition("#{@page.title}.html"))
return
elsif params[:format] == 'txt'
- send_data(@content.text, :type => 'text/plain', :filename => "#{@page.title}.txt")
+ send_data(@content.text, :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt"))
return
end
end