aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-07 23:58:24 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-07 23:58:24 +0000
commit21c5edb2ea807bc3ea575d4ec22981e32d879e20 (patch)
tree251d5b88e8a4673409149898cfe89455ca2b78b4 /sonar-server
parent7a07af0d844c1bb30b2c7df4aeafa0642fc7ce2f (diff)
downloadsonarqube-21c5edb2ea807bc3ea575d4ec22981e32d879e20.tar.gz
sonarqube-21c5edb2ea807bc3ea575d4ec22981e32d879e20.zip
quality profiles: fix backup filename when the profile name contains spaces
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
index 097947ba703..21800f05caf 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
@@ -142,7 +142,8 @@ class ProfilesController < ApplicationController
def backup
profile = Profile.find(params[:id])
xml = java_facade.backupProfile(profile.id)
- send_data(xml, :type => 'text/xml', :disposition => "attachment; filename=#{profile.name}_#{profile.language}.xml")
+ filename=profile.name.gsub(' ', '_')
+ send_data(xml, :type => 'text/xml', :disposition => "attachment; filename=#{filename}_#{profile.language}.xml")
end