From ffe56f3b8c579b5f5dbf47ae1e5bb052a64d9783 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Mon, 5 Sep 2011 20:04:37 +0700 Subject: Make sure that result from content_tag_for with collection is html_safe Thank you @spastorino for catching the empty test in b84cee0, as I totally forgot that I still have to make it html_safe. --- actionpack/lib/action_view/helpers/record_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionpack/lib/action_view/helpers/record_tag_helper.rb index ad8896a2fd..cbee517adc 100644 --- a/actionpack/lib/action_view/helpers/record_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/record_tag_helper.rb @@ -84,7 +84,7 @@ module ActionView if single_or_multiple_records.respond_to?(:to_ary) single_or_multiple_records.to_ary.map do |single_record| capture { content_tag_for_single_record(tag_name, single_record, prefix, options, &block) } - end.join("\n") + end.join("\n").html_safe else content_tag_for_single_record(tag_name, single_or_multiple_records, prefix, options, &block) end -- cgit v1.2.3