From 21c5edb2ea807bc3ea575d4ec22981e32d879e20 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Tue, 7 Sep 2010 23:58:24 +0000 Subject: quality profiles: fix backup filename when the profile name contains spaces --- .../src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3