From 0fb7b800a6a403fb6b7eff111f5ce628d7aae03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Pastorino=20and=20Jos=C3=A9=20Ignacio=20Costa?= Date: Thu, 4 Feb 2010 21:14:46 -0200 Subject: [PATCH] More html_safe strings now use the safe_concat method --- actionpack/lib/action_view/helpers/form_helper.rb | 2 +- .../lib/action_view/helpers/form_tag_helper.rb | 6 +++--- .../lib/action_view/helpers/javascript_helper.rb | 2 +- actionpack/lib/action_view/helpers/tag_helper.rb | 2 +- actionpack/lib/action_view/render/rendering.rb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index c2ad7e9..238f2eb 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -309,7 +309,7 @@ module ActionView options[:html][:remote] = true if options.delete(:remote) - concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {})) + safe_concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {})) fields_for(object_name, *(args << options), &proc) safe_concat('') end diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index ba1b0bc..6ed6c31 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -441,8 +441,8 @@ module ActionView # # =>

def field_set_tag(legend = nil, options = nil, &block) content = capture(&block) - concat(tag(:fieldset, options, true)) - concat(content_tag(:legend, legend)) unless legend.blank? + safe_concat(tag(:fieldset, options, true)) + safe_concat(content_tag(:legend, legend)) unless legend.blank? concat(content) safe_concat("") end @@ -477,7 +477,7 @@ module ActionView def form_tag_in_block(html_options, &block) content = capture(&block) - concat(form_tag_html(html_options)) + safe_concat(form_tag_html(html_options)) concat(content) safe_concat("") end diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 7dca984..8fdaa8c 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -86,7 +86,7 @@ module ActionView tag = content_tag(:script, javascript_cdata_section(content), html_options.merge(:type => Mime::JS)) if block_called_from_erb?(block) - concat(tag) + safe_concat(tag) else tag end diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index ed80e07..a3a8185 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -72,7 +72,7 @@ module ActionView content_tag = content_tag_string(name, capture(&block), options, escape) if block_called_from_erb?(block) - concat(content_tag) + safe_concat(content_tag) else content_tag end diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 7c33f13..abc7c09 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -19,7 +19,7 @@ module ActionView options[:locals] ||= {} if block_given? - return concat(_render_partial(options.merge(:partial => layout), &block)) + return safe_concat(_render_partial(options.merge(:partial => layout), &block)) elsif options.key?(:partial) return _render_partial(options) end -- 1.6.5