diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-08-30 15:46:45 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-08-30 15:46:45 +0000 |
commit | 0f6fd7584b11d1f098f5b945c30651d1b078c1de (patch) | |
tree | b8f393546328873d32e0ad5ba528b810a843ac0c /app/controllers | |
parent | 1aa08f9c0efe73af6ecac7f0e443c25549cfbb65 (diff) | |
download | redmine-0f6fd7584b11d1f098f5b945c30651d1b078c1de.tar.gz redmine-0f6fd7584b11d1f098f5b945c30651d1b078c1de.zip |
fix file name corruption when export a wiki page with non-ASCII title in MS browsers (#26599)
Contributed by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@16957 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-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 25e59adb0..b43b933cd 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 |