From fba98d789cd3ab04cc0e1969f5bb15b7c268f816 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 26 Feb 2013 14:21:38 +1100 Subject: Make flash message in admin interface html safe --- app/controllers/admin_request_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/admin_request_controller.rb') diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index ed8de7755..a0ade5d19 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -304,7 +304,7 @@ class AdminRequestController < AdminController post_redirect.save! url = main_url(confirm_url(:email_token => post_redirect.email_token, :only_path => true)) - flash[:notice] = 'Send "' + name + '" <' + email + '> this URL: ' + url + " - it will log them in and let them upload a response to this request.".html_safe + flash[:notice] = ('Send "' + name + '" <' + email + '> this URL: ' + url + " - it will log them in and let them upload a response to this request.").html_safe redirect_to request_admin_url(info_request) end -- cgit v1.2.3 From e50f9ddb3c4f80cdff672a68865f392f249067c4 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 26 Feb 2013 14:26:20 +1100 Subject: Use string interpolation to make the flash message more readable in the code --- app/controllers/admin_request_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/admin_request_controller.rb') diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index a0ade5d19..15d66aa0d 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -304,7 +304,7 @@ class AdminRequestController < AdminController post_redirect.save! url = main_url(confirm_url(:email_token => post_redirect.email_token, :only_path => true)) - flash[:notice] = ('Send "' + name + '" <' + email + '> this URL: ' + url + " - it will log them in and let them upload a response to this request.").html_safe + flash[:notice] = ("Send \"#{name}\" <#{email}> this URL: #{url} - it will log them in and let them upload a response to this request.").html_safe redirect_to request_admin_url(info_request) end -- cgit v1.2.3