diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-08-30 16:39:41 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-08-30 16:39:41 +0000 |
commit | 995a0111e94a68ae7d598b0690831f853ea2e4c7 (patch) | |
tree | e7a86841a6b2bc874fea05bec9c50afe3e36b25a /app/controllers/wiki_controller.rb | |
parent | 2ede29186ce3eda0f31eda4c8492d517496abd5c (diff) | |
download | redmine-995a0111e94a68ae7d598b0690831f853ea2e4c7.tar.gz redmine-995a0111e94a68ae7d598b0690831f853ea2e4c7.zip |
Merged r16957 from trunk to 3.3-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.3-stable@16960 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r-- | app/controllers/wiki_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 36a9b8741..ebf7a1884 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -97,14 +97,14 @@ class WikiController < ApplicationController end 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 |