Non-ascii attachement filename fix for IE.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1053 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-01-10 22:42:41 +00:00
parent a39f655a7c
commit 941f9bf3dd
4 changed files with 10 additions and 3 deletions
+5
View File
@@ -196,4 +196,9 @@ class ApplicationController < ActionController::Base
end
return tmp
end
# Returns a string that can be used as filename value in Content-Disposition header
def filename_for_content_disposition(name)
request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
end
end